<?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="Line Chart"/>
<mx:LineChart id="lineAgeChart" dataProvider="{this._chartDataProvider}" showDataTips="true" width="500" height="630">
<mx:horizontalAxis>
<mx:CategoryAxis dataProvider="{this._chartDataProvider}" categoryField="chartAgeRange"/>
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries yField="noOfUser" displayName="No. of Users" form="curve" interpolateValues="true">
<mx:lineStroke>
<mx:Stroke color="haloBlue" weight="3" alpha=".8"/>
</mx:lineStroke>
</mx:LineSeries>
</mx:series>
</mx:LineChart>
<mx:Legend dataProvider="{lineAgeChart}"/>
</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