How do I display grouped XML data in a Flex pie chart?
- by mclaughlinj
I've looked into grouping XML data with GroupingCollections and AdvancedDataGrids, but I can't figure out how to display that data in a chart.
Basically, what I want to do is group the data by the category field, which should give me two rows under red, one under blue, and one under green. When inputting this data into the pie chart, it should take up the right amount of space (1/2 for red, 1/4 each for blue and green). I don't need the other_data field, as I'd like to use the group name (category in this case) as the callout.
Any suggestions?
Sample 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>