<?xml version="1.0"?> <!-- charts/VerticalLineChart.mxml --> <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: "Jan", Profit: 2000, Expenses: 1100}, {Month: "Feb", Profit: 1800, Expenses: 1055}, {Month: "Mar", Profit: 1200, Expenses: 800}, {Month: "Apr", Profit: 1400, Expenses: 900}, {Month: "May", Profit: 1400, Expenses: 1150}, {Month: "Jun", Profit: 1340, Expenses: 600}, {Month: "Jul", Profit: 1600, Expenses: 950}, {Month: "Aug", Profit: 1500, Expenses: 1140}, {Month: "Sep", Profit: 1800, Expenses: 1200}, {Month: "Oct", Profit: 2000, Expenses: 1280}, {Month: "Nov", Profit: 2400, Expenses: 1300}, {Month: "Dec", Profit: 1500, Expenses: 500}]); ]]--> </mx:Script> <mx:Panel title="Vertical Line Chart"> <mx:LineChart id="myChart" dataProvider="{expenses}" showDataTips="true"> <mx:verticalAxis> <mx:CategoryAxis dataProvider="{expenses}" categoryField="Month"/> </mx:verticalAxis> <mx:series> <mx:LineSeries xField="Profit" yField="Month" displayName="Profit" sortOnXField="false"/> <mx:LineSeries xField="Expenses" yField="Month" displayName="Expenses" sortOnXField="false"/> </mx:series> </mx:LineChart> <mx:Legend dataProvider="{myChart}"/> </mx:Panel> </mx:Application>