I have something like this xml data
<data>
<result month="Jan-04">
<employee id="1">
<a>81768</a>
<b>60310</b>
<c>43357</c>
</employee>
<employee id="2">
<a>81768</a>
<b>60310</b>
<te>43357</c>
</employee>
</result>
<result month="Feb-04">
<employee id="1">
<a>81156</a>
<b>58883</b>
<c>49280</c>
</employee>
<employee id="2">
<a>81768</a>
<b>60310</b>
<c>43357</c>
</employee>
</result>
I want to display it line chart with month on horizontal axis and a,b,c as series for employee with id==1. The following code doesnt display any data on the chart. Could someone point out the error?
<mx:HTTPService id="srv" url="D:/data.xml" useProxy="false" result="myData=ArrayCollection(srv.lastResult.data.result)"/>
<mx:Panel title="Line Chart">
<mx:LineChart id="myChart"
showDataTips="true"
enabled="true" dataProvider="{myData}">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="month"/>
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries yField="employee[0].a" displayName="A" name="a"/>
<mx:LineSeries yField="employee[0].b" displayName="B" name="b"/>
<mx:LineSeries yField="employee[0].c" displayName="C" name="c"/>
</mx:series>
</mx:LineChart>
<mx:Legend dataProvider="{myChart}"/>