[flexcoders] Re: building a pie chart with XML data
--- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote: I am trying to construct a pie chart using XML data and the resulting chart is empty. Because I am using the trial version I do see the flex data visualization trial message. However, the pie chart does not appear. I have the xml file located in the src directory. My flex 3 code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 mx:series mx:PieSeries dataProvider={rockstar.lastResult.piebv.employee} Try removing the piebv in the above line. HTH; Amy
[flexcoders] Re: building a pie chart with XML data
Try this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=rockstar.send() mx:HTTPService id=rockstar url=xmldata.xml / mx:PieChart width=300 height=300 dataProvider={rockstar.lastResult.employees.employee} mx:series mx:PieSeries field=sales labelField=name labelPosition=callout / /mx:series /mx:PieChart mx:Button label=fred/ /mx:Application --- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote: I am trying to construct a pie chart using XML data and the resulting chart is empty. Because I am using the trial version I do see the flex data visualization trial message. However, the pie chart does not appear. I have the xml file located in the src directory. My flex 3 code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 mx:series mx:PieSeries dataProvider={rockstar.lastResult.piebv.employee} field=@sales labelField=@name labelPosition=callout / /mx:series /mx:PieChart /mx:Application My XML: ?xml version=1.0 encoding=utf-8 ? employees employee name=Doug sales=15 / employee name=Deepa sales=75000 / employee name=Darron sales=3 / employee name=Ben sales=6 / /employees
[flexcoders] Re: building a pie chart with XML data
Try this (moved the dataprovider to the chart rather than the series and removed the @ before the field names) ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 dataProvider={rockstar.lastResult.employees.employee} mx:series mx:PieSeries field=sales labelField=name labelPosition=callout / /mx:series /mx:PieChart /mx:Application --- In flexcoders@yahoogroups.com, flexnoob flexn...@... wrote: I am trying to construct a pie chart using XML data and the resulting chart is empty. Because I am using the trial version I do see the flex data visualization trial message. However, the pie chart does not appear. I have the xml file located in the src directory. My flex 3 code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=rockstar.send() mx:HTTPService id=rockstar url=piebv.xml / mx:PieChart width=300 height=300 mx:series mx:PieSeries dataProvider={rockstar.lastResult.piebv.employee} field=@sales labelField=@name labelPosition=callout / /mx:series /mx:PieChart /mx:Application My XML: ?xml version=1.0 encoding=utf-8 ? employees employee name=Doug sales=15 / employee name=Deepa sales=75000 / employee name=Darron sales=3 / employee name=Ben sales=6 / /employees