FLEX: how to fill AreaSeries with an arrayCollection
how can I display the content of an arrayCollection in my an mx:AreaSeries ?
arrayCollection = [12,31,12,42];
<mx:CartesianChart id="AllChart" dataProvider="{arrayCollection}" width="100%" height="100">
<mx:AreaSeries" /> <!-- how can I refer to the cells ? Should I use associative array ? --&g开发者_开发百科t;
</mx:Cartesian Chart>
thanks
You should use objects in an array collection, such as the example here:
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_02.html
ie:
arrayCollection = [{val:12},{val:31},{val:12},{val:42}];
<mx:CartesianChart id="AllChart" dataProvider="{arrayCollection}" width="100%" height="100">
<mx:AreaSeries yField="val" /> <!-- how can I refer to the cells ? Should I use associative array ? -->
</mx:Cartesian Chart>
精彩评论