Monday, 28 March 2011

Form Designing In Flex III (Plot Chart)


<?xml version="1.0" encoding="utf-8"?>

<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml"
 layout="absolute"
 width="100%" height="100%">

<mx:VBox>
<mx:FormHeading label="Plot Chart"/>

<mx:PlotChart id="plotChart" dataProvider="{this._chartDataProvider}" showDataTips="true"  width="500" height="630">

<mx:series>
<mx:PlotSeries xField="plotAgeRange" yField="noOfUser" displayName="No. of Users">
<mx:fill>
<mx:SolidColor color="haloBlue" alpha=".3"/>
</mx:fill>
</mx:PlotSeries>
</mx:series>

</mx:PlotChart>

<mx:Legend dataProvider="{plotChart}"/>
</mx:VBox>

<mx:Script>
<![CDATA[

import mx.collections.ArrayCollection;

[Bindable] public var _chartDataProvider:ArrayCollection;

public function set chartDataProvider(chartsDataProviderArg:ArrayCollection):void
{
this._chartDataProvider = chartsDataProviderArg;
}

[Bindable]
public function get chartDataProvider():ArrayCollection
{
return this._chartDataProvider;
}
]]>
</mx:Script>

</mx:Panel>

No comments:

Post a Comment