Monday, 28 March 2011

Form Designing In Flex III (PieChart)


<?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="Pie Chart"/>

<mx:PieChart id="ageChart" dataProvider="{this._chartDataProvider}" showDataTips="true" innerRadius="0.1" width="500" height="590">

<mx:series>
<mx:PieSeries field="noOfUser" nameField="chartAgeRange" labelPosition="inside">
<mx:fills>
<mx:SolidColor color="0xCC66FF" alpha=".8"/>
<mx:SolidColor color="haloBlue" alpha=".8"/>
<mx:SolidColor color="0x6699CC" alpha=".8"/>
</mx:fills>
</mx:PieSeries>
</mx:series>

</mx:PieChart>

<mx:Legend dataProvider="{ageChart}"/>
</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