Plot Chart Demo : Plot Chart « Chart « Flex






Plot Chart Demo

Plot Chart Demo
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:Script>
    

    import mx.collections.ArrayCollection;
        
    [Bindable]
    private var productSales:ArrayCollection = new ArrayCollection( [
            { Quarter: "1", PC: 10000, Mac: 3000, Gadgets: 1000, Total: 14000 },
            { Quarter: "2", PC: 12000, Mac: 4000, Gadgets: 2000, Total: 18000 },
            { Quarter: "3", PC: 15000, Mac: 8000, Gadgets: 5000, Total: 28000 },
            { Quarter: "4", PC: 20000, Mac: 10000, Gadgets: 9000, Total: 39000 }
            ]);;
 
  
    </mx:Script>

  <mx:Panel title="PlotChart Example" width="100%" height="100%" >

    <mx:PlotChart id="plotChart" height="100%" width="100%" showDataTips="true" dataProvider="{productSales}">
                
      <mx:series>
        <mx:PlotSeries xField="PC" yField="Mac" displayName="PC/Mac"/>
        <mx:PlotSeries xField="Gadgets" yField="PC" displayName="Gadgets/PC"/>
        <mx:PlotSeries xField="Mac" yField="Gadgets" displayName="Mac/Gadgets"/>
      </mx:series>
    </mx:PlotChart>
    <mx:Legend dataProvider="{plotChart}" direction="horizontal"/>
  </mx:Panel>
</mx:Application>

   
    
  








Related examples in the same category

1.Plot chart used to display two seriesPlot chart used to display two series
2.Plot Chart With Renderers: CircleItemRenderer, ShadowBoxItemRenderer, CrossItemRendererPlot Chart With Renderers: CircleItemRenderer, ShadowBoxItemRenderer, CrossItemRenderer
3.The following example defines three data series in a PlotChart controlThe following example defines three data series in a PlotChart control
4.Use the graphic file to represent data points on a PlotChart controlUse the graphic file to represent data points on a PlotChart control
5.Create a PlotChart control and records the location of the mouse pointerCreate a PlotChart control and records the location of the mouse pointer
6.Define three data series in a PlotChart controlDefine three data series in a PlotChart control
7.Use gif graphic to represent each data point on the plot chartUse gif graphic to represent each data point on the plot chart
8.Set renderer for the second series to the CircleItemRenderer and the renderer for the third series to the CrossItemRenderer in ActionScript.Set renderer for the second series to the CircleItemRenderer and the renderer for the third series to the CrossItemRenderer in ActionScript.
9.overrides the default renderers for the seriesoverrides the default renderers for the series
10.Use default DiamondItemRenderer class for the first data seriesUse default DiamondItemRenderer class for the first data series
11.Sets the legend marker of all three series to the DiamondItemRenderer classSets the legend marker of all three series to the DiamondItemRenderer class
12.Display data points in each series that are currently selectedDisplay data points in each series that are currently selected
13.Plot With Custom RendererPlot With Custom Renderer
14.Clearing selectionsClearing selections
15.selectedIndices property lets you select any number of ChartItems in a chart control.selectedIndices property lets you select any number of ChartItems in a chart control.
16.Randomly generating chart dataRandomly generating chart data
17.logs a ChartEvent when you click or double-click the chart controllogs a ChartEvent when you click or double-click the chart control