0
我已经研究了用GroupingCollections和AdvancedDataGrids分组XML数据,但我无法弄清楚如何在图表中显示该数据。如何在Flex饼图中显示分组的XML数据?
基本上,我想要做的是按类别字段分组数据,这应该给我两行下红色,一个下蓝色,一个下绿色。将此数据输入到饼图时,它应占用适当的空间量(红色为1/2,蓝色和绿色为1/4)。我不需要other_data字段,因为我想使用组名称(在本例中为类别)作为标注。
有什么建议吗?
的样本数据:
<row>
<category>red</category>
<other_data>this shouldn't really matter</other_data>
</row>
<row>
<category>blue</category>
<other_data>this shouldn't really matter</other_data>
</row>
<row>
<category>red</category>
<other_data>this shouldn't really matter</other_data>
</row>
<row>
<category>green</category>
<other_data>this shouldn't really matter</other_data>
</row>
@Mike我能够将数据拉入GroupingCollection并将其输出到AdvancedDataGrid中(并且它已正确分组),但是当我试图定义图表的dataSource属性时,它会出错并且不显示。 – mclaughlinj 2010-06-10 16:00:57