Legend for AreaChart : Area Chart « Chart « Flex






Legend for AreaChart

Legend for AreaChart
        
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">

  <mx:Script>
    
    import  mx.collections.ArrayCollection;
    

    [Bindable]
    private  var  productSales:ArrayCollection = new ArrayCollection( [
            { Quarter: "1", PC: 10, Mac: 3, Software: 1, Total: 14 },
            { Quarter: "2", PC: 12, Mac: 4, Software: 2, Total: 18 },
            { Quarter: "3", PC: 15, Mac: 8, Software: 5, Total: 28 },
            { Quarter: "4", PC: 20, Mac: 10, Software: 9, Total: 39 }
            ]);
     
  
  </mx:Script>

  <mx:Panel  title="AreaChart  Example"  width="100%"  height="100%">
    <mx:AreaChart  id="areaChart"  height="100%"  width="100%"
        paddingLeft="5"  paddingRight="5"  
        showDataTips="true" dataProvider="{productSales}">                            
      <mx:horizontalAxis>
        <mx:CategoryAxis  categoryField="Quarter"/>
      </mx:horizontalAxis>
      <mx:series>
        <mx:AreaSeries  yField="PC"  form="curve"  displayName="PC"/>
        <mx:AreaSeries  yField="Mac"  form="curve"  displayName="Mac"/>
        <mx:AreaSeries  yField="Software"  form="curve"  displayName="Software"/>
      </mx:series>
    </mx:AreaChart>            
    <mx:Legend  dataProvider="{areaChart}" direction="horizontal"/>
  </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
    
  








Related examples in the same category

1.Area chart with AreaSeries and CategoryAxisArea chart with AreaSeries and CategoryAxis
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