I have been trying all morning to figure out how to set the dataprovider
for a line chart in actionscript.
Below is the code. The dataprovider in MXML works (and its the exact
same dataprovider!). And if I put the statement back into the MXML for
the mx:LineChart it will work. Why wont this work in the actionscript?
******************************
Dataprovider in ActionScript
******************************
<mx:Script>
<![CDATA[
[...{
switch(lineOfBusiness)
{
case "ABC":
chartXML.url="http://hostname/Data/xmlData_ALL_ABC_12Months_All_Days_200
7.php";
chartXML.send();
[....]
line_Chart.dataProvider =
chartXML.lastResult.month[month_number].day;
[....}
</mx:Script>
<mx:HTTPService id="chartXML" resultFormat="e4x" showBusyCursor="true"
/>
<mx:LineChart id="line_Chart"
width="932" height="309" x="23" y="10"
showDataTips="true" >
<mx:horizontalAxis>
<mx:CategoryAxis id="cat1"
dataProvider="{chartXML.lastResult.month[month_number].day}"
categoryField="{categoryFieldString}"
title="{categoryAxisTitleString}" />
</mx:horizontalAxis>
</mx:LineChart>