<?xml version="1.0"?>
<!-- プロットチャートの使用方法を示す簡単な例 -->
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
var expenses = [{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="Plot Chart Panel" height="100%" width="100%">
<mx:HBox id="box" height="100%" width="100%">
<mx:PlotChart id="plot" marginLeft="5" height="100%" width="100%"
marginRight="5" dataProvider="{expenses}" showDataTips="true">
<mx:series>
<mx:Array>
<mx:PlotSeries xField="Expenses" yField="Profit" name="Expenses/Profit"/>
<mx:PlotSeries xField="Amount" yField="Expenses" name="Amount/Expenses"/>
<mx:PlotSeries xField="Profit" yField="Amount" name="Profit/Amount"/>
</mx:Array>
</mx:series>
</mx:PlotChart>
<mx:Legend dataProvider="plot"/>
</mx:HBox>
</mx:Panel>
</mx:Application>
|