Area chart with AreaSeries and CategoryAxis : Area Chart « Chart « Flex






Area chart with AreaSeries and CategoryAxis

Area chart with AreaSeries 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:AreaChart id="salesChart" dataProvider="{salesData}"
        height="100%" width="100%">
        <mx:horizontalAxis>
            <mx:CategoryAxis categoryField="@interval" />
        </mx:horizontalAxis>
        <mx:series>
            <mx:AreaSeries yField="@pc"
                displayName="Ferrari Count" alpha="0.5" />
            <mx:AreaSeries yField="@mac"
                displayName="Porsche Count" alpha="0.5" />
        </mx:series>
    </mx:AreaChart>
</mx:Application>

   
    
  








Related examples in the same category

1.Legend for AreaChartLegend for AreaChart
2.Set CategoryAxis for AreaChartSet CategoryAxis for AreaChart
3.AreaChartAreaChart
4.Basic Area One Series for AreaChartBasic Area One Series for AreaChart
5.Basic AreaChartBasic AreaChart
6.Create an AreaChart controlCreate an AreaChart control
7.Define three custom SolidColor objects and three custom SolidColorStroke objects, and applies them to the three AreaSeries objects in the AreaChart controlDefine three custom SolidColor objects and three custom SolidColorStroke objects, and applies them to the three AreaSeries objects in the AreaChart control
8.Area Chart with Area seriesArea Chart with Area series
9.Define an area chart in which each series in the chart uses a solid fill with the same level of transparency:Define an area chart in which each series in the chart uses a solid fill with the same level of transparency:
10.Stacked Area ChartStacked Area Chart
11.Setting a value for the minField property creates two values on the axis for each data point in an areaSetting a value for the minField property creates two values on the axis for each data point in an area