Plot chart used to display two series : Plot Chart « Chart « Flex






Plot chart used to display two series

Plot chart used to display two series
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:XML id="plotDataXML">
        <plotdata>
            <one>
                <data x="1" y="5" />
                <data x="3" y="8" />
                <data x="3" y="9" />
                <data x="5" y="9" />
            </one>
            <two>
                <data x="2" y="1" />
                <data x="2" y="3" />
                <data x="4" y="7" />
                <data x="4" y="4" />
            </two>
        </plotdata>
    </mx:XML>
    <mx:XMLListCollection source="{plotDataXML.one.data}" id="plotData1" />
    <mx:XMLListCollection source="{plotDataXML.two.data}" id="plotData2" />
    <mx:Panel title="Plot Data" width="500" height="200" layout="horizontal">
        <mx:Legend dataProvider="{plotChart}" />
        <mx:PlotChart id="plotChart" height="100%" width="100%">
            <mx:series>
                <mx:PlotSeries dataProvider="{plotData1}" displayName="One" xField="@x" yField="@y" radius="4" />
                <mx:PlotSeries dataProvider="{plotData2}" displayName="Two" xField="@x" yField="@y" radius="4" />
            </mx:series>
        </mx:PlotChart>
    </mx:Panel>
</mx:Application>

   
    
  








Related examples in the same category

1.Plot Chart DemoPlot Chart Demo
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