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="150000" />
> 
>              <employee name="Deepa"     sales="75000"  />
> 
>              <employee name="Darron" sales="30000"  />
> 
>              <employee name="Ben"     sales="60000"  />
> 
>          </employees>
>


Reply via email to