<?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 } ]);
]]>
</mx:Script>
<mx:Panel title="PlotChart Control" layout="horizontal" color="0xffffff" borderAlpha="0.15" width="600" height="240"
paddingTop="10" paddingRight="10" paddingBottom="10" paddingLeft="10" horizontalAlign="center" x="10" y="10">
<mx:PlotChart id="plot" height="100%" paddingLeft="5" paddingRight="5" color="0x323232"
showDataTips="true" dataProvider="{expensesAC}">
<mx:series>
<mx:PlotSeries xField="Expenses" yField="Profit" displayName="Expenses/Profit"/>
<mx:PlotSeries xField="Amount" yField="Expenses" displayName="Amount/Expenses"/>
<mx:PlotSeries xField="Profit" yField="Amount" displayName="Profit/Amount"/>
</mx:series>
</mx:PlotChart>
<mx:Legend dataProvider="{plot}" color="0x323232"/>
</mx:Panel>
</mx:Application>
No comments:
Post a Comment