如何在我的mx:AreaSeries中显示arrayCollection的内容?
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>
感谢
答案 0 :(得分:0)
您应该在数组集合中使用对象,例如此处的示例:
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_02.html
即:
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>