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