<?xml version=”1.0″?> <mx:Application xmlns:mx=” http://www.adobe.com/2006/mxml “> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:”January”, Profit:2000, Expenses:1500, Amount:450,IT:1300, Media:1100, MBA:250}, {Month:”February”, Profit:1000, Expenses:200, Amount:600,IT:1340, Media:1120, MBA:450}, {Month:”March”, Profit:1500, Expenses:500, Amount:300,IT:1230, Media:1230, MBA:650}, {Month:”April”, Profit:500, Expenses:300, Amount:500,IT:1378, Media:1430, MBA:800}, {Month:”May”, Profit:1000, Expenses:450, Amount:250,IT:1534, Media:1300, MBA:950}, {Month:”June”, Profit:2000, Expenses:500, Amount:700,IT:1989, Media:1200, MBA:150} ]); ]]> </mx:Script> <mx:Panel title=”Plot Chart”> <mx:PlotChart id=”myChart” dataProvider=”{expenses}” showDataTips=”true”> <mx:series> <mx:PlotSeries xField=”Expenses” yField=”Profit” displayName=”cross” itemRenderer=”mx.charts.renderers.CrossItemRenderer” radius=”10″/> <mx:PlotSeries xField=”Amount” yField=”Expenses” displayName=”diamond” itemRenderer=”mx.charts.renderers.DiamondItemRenderer” /> <mx:PlotSeries xField=”Profit” yField=”Amount” displayName=”triangle” itemRenderer=”mx.charts.renderers.TriangleItemRenderer” /> <mx:PlotSeries xField=”Profit” yField=”IT” displayName=”default(BOX)”/> <mx:PlotSeries xField=”Profit” yField=”Media” displayName=”circle” itemRenderer=”mx.charts.renderers.CircleItemRenderer” /> <mx:PlotSeries xField=”Profit” yField=”MBA” displayName=”shadow box” itemRenderer=”mx.charts.renderers.ShadowBoxItemRenderer” /> </mx:series> </mx:PlotChart> <mx:Legend dataProvider=”{myChart}”/> </mx:Panel> </mx:Application>
|