<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="top"
horizontalAlign="center"
backgroundGradientColors="[#570A0A, #731F1F]" paddingTop="0"
backgroundGradientAlphas="[1.0, 1.0]">
<mx:Script>
<![CDATA[
import
mx.collections.ArrayCollection;
[Bindable]
private var expensesAC:ArrayCollection = new ArrayCollection( [
{
Month: "Jan", Profit: 2000, Expenses: 1500,
Amount: 450 },
{
Month: "Feb", Profit: 1000, Expenses: 200,
Amount: 600 },
{
Month: "Mar", Profit: 1500, Expenses: 500,
Amount: 300 },
{
Month: "Apr", Profit: 1800, Expenses: 1200,
Amount: 900 },
{
Month: "May", Profit: 2400, Expenses: 575,
Amount: 500 } ]);
]]>
</mx:Script>
<mx:Style>
BubbleChart { color:#000099; }
</mx:Style>
<mx:Panel title="BubbleChart Control" layout="vertical" color="0xffffff" borderAlpha="0.15" width="600" height="240"
paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center" x="10" y="10">
<mx:BubbleChart id="bubblechart" height="100%" width="100%" paddingRight="5" paddingLeft="5" color="0x323232"
showDataTips="true" maxRadius="20" dataProvider="{expensesAC}">
<mx:series>
<mx:BubbleSeries displayName="Profit/Expenses/Amount"
xField="Profit" yField="Expenses" radiusField="Amount"/>
</mx:series>
</mx:BubbleChart>
<mx:Legend dataProvider="{bubblechart}" color="0x323232"/>
</mx:Panel>
</mx:Application>
No comments:
Post a Comment