hi, try this: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal" backgroundColor="0xFFFFFF"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection;
[Bindable] public var chartData:ArrayCollection = new ArrayCollection([ {day:'Monday',temperature:78}, {day:'Tuesday',temperature:66}, {day:'Wednesday',temperature:55}, {day:'Thursday',temperature:84}, {day:'Friday',temperature:52}, {day:'Saturday',temperature:45}, {day:'Sunday',temperature:24} ]); ]]> </mx:Script> <mx:ToggleButtonBar dataProvider="{charts}" direction="vertical" / > <mx:ViewStack id="charts" > <mx:Panel label="DataGrid" width="500" height="500"> <mx:DataGrid dataProvider="{chartData}" editable="true" width="100%" height="100%"> <mx:columns> <mx:DataGridColumn headerText="Day" dataField="day" editable="false"/> <mx:DataGridColumn headerText="Temperature" dataField="temperature"/> </mx:columns> </mx:DataGrid> </mx:Panel> <mx:Panel label="Pie" width="500" height="500"> <mx:PieChart dataProvider="{chartData}" width="100%" height="100%"> <mx:series> <mx:PieSeries field="temperature" nameField="day" labelPosition="callout" displayName="Temperature"/> </mx:series> </mx:PieChart> </mx:Panel> </mx:ViewStack> </mx:Application> On Nov 18, 11:43 am, niranjan kumar <niranjan....@gmail.com> wrote: > Hi All, > > I have Panel, inside a panel I have a Piechart. For the panel i have > taken two toggle buttons. > When I click one toggle button, It will display the Pie Chart with > values. > when I click another toggle button. It will display the data in a > Datagrid with two columns. > > Requirement:When we change the data in the Datagrid, that should reflect in > the Piechart. Please reply me as soon as possible. > > Thanks & Regards : > > Niranjan Kumar. -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_in...@googlegroups.com. To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/flex_india?hl=.