0
动态检测LineSeries这是我的数组集合创造线型图
[Bindable]private var Projects:ArrayCollection = new ArrayCollection([
{ Department: "Software", TotalProjects: 73,Completed:30,Inprogress:30,Approved:13},
{ Department: "XML",TotalProjects: 50,Completed:20,Inprogress:20,Approved:10},
{ Department: "Publishing",TotalProjects: 25,Completed:5,Inprogress:10,Approved:10},
{ Department: "Indesign", TotalProjects: 70,Completed:30,Inprogress:30,Approved:10},
{ Department: "Imaging", TotalProjects: 42,Completed:30,Inprogress:10,Approved:2}]);
折线图线系列:
<mx:series>
<mx:LineSeries id="cs1"
yField="TotalProjects"
xField="Department"
displayName="TotalProjects">
</mx:LineSeries>
<mx:LineSeries id="cs2"
yField="Inprogress"
xField="Department"
displayName="Inprogress">
</mx:LineSeries>
<mx:LineSeries id="cs3"
yField="Completed"
xField="Department"
displayName="Completed">
</mx:LineSeries>
<mx:LineSeries id="cs4"
yField="Approved"
xField="Department"
displayName="Approved">
</mx:LineSeries>
</mx:series>
如何创建mx:LineSeries
动态取决于阵列收藏价值。现在只有4行系列在那里,但有时我必须显示更多按照数组集合值更改前:如果多一个状态HoldProject
添加到数组集合?
OK.if我收到具有不同属性的数组集合对象,每次如何遍历数组集合项并创建线条系列? –
您能否提供更多详细信息?因为,我们怎么知道,每个项目应该使用哪个字段作为yField? –
@ Timofei Davydik在给出'Department'的数组集合中是很常见的,但剩下的字段有时只有3个状态发生变化:'Completed','hold',''approved'和一些更多的'Completed','hold','approved', '删除','初始','延期'等。 –