Line chart with LineSeries and CategoryAxis
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="white"> <mx:XML id="salesDataXML"> <salesdata> <all> <data interval="Q1" pc="2" pcRevenue="2.32" mac="2" macRevenue="0.180"/> <data interval="Q2" pc="5" pcRevenue="7.82" mac="3" macRevenue="0.240" /> <data interval="Q3" pc="4" pcRevenue="6.92" mac="7" macRevenue="0.420"/> <data interval="Q4" pc="1" pcRevenue="1.80" mac="12" macRevenue="1.180"/> </all> </salesdata> </mx:XML> <mx:XMLListCollection source="{salesDataXML.all.data}" id="salesData" /> <mx:Panel title="FlexMoto Car Sales" width="500" height="250"> <mx:LineChart id="salesChart" dataProvider="{salesData}" height="100%" width="100%"> <mx:horizontalAxis> <mx:CategoryAxis categoryField="@interval" /> </mx:horizontalAxis> <mx:series> <mx:LineSeries yField="@pc" /> <mx:LineSeries yField="@mac" /> </mx:series> </mx:LineChart> </mx:Panel> </mx:Application>