tags:

views:

107

answers:

1

hi,

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 ? -->
</mx:Cartesian Chart>

thanks

A: 

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>
quoo