Pie Chart Drill down

26 views
Skip to first unread message

Kiran Kumar Vasireddy

unread,
Dec 30, 2009, 6:00:46 PM12/30/09
to Flex India Community
Dear All,

I am using Pie chart for company sales info and XMLList as a data provider . Clicking on Pie chart slice I am using the the below code to get the data Object . This looks bit odd to me . Is there any simple way like for combobox we use combobox.SelectedItem.Model . So like this is there any simple way to the selected part .Example XML data is provided below

private function pieChart_itemClick(evt:ChartItemEvent):void {
                    var item:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
                    var xml:XML=evt.hitData.item as XML;
                    graphPie.dataProvider=xml.Model;

where graphPie is Pie Chart Id

<Company name="GM" count="100">
  <Model name="chevi" count ="30">
    <Year name="2009" count="10">
    <Year name="2008" count="20">
</Model>
</Company>

Thanks for your help
Regards
Kiran
Reply all
Reply to author
Forward
0 new messages