Thanks!  That worked.
 
I have noticed that I am not setting the dataprovider for my category
axis and its still getting filled in?  Is that possible? Or am I already
fried for the day?
 
I put the dataprovider in for it anyway just to be explicit.
 
brad

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Sherif Abdou
Sent: Tuesday, February 12, 2008 1:39 PM
To: [email protected]
Subject: Re: [flexcoders] XML, HTTPSerivce, & Setting dataProvider in
Action Script





lastResult doesnt work in Actionscript only MXML, you get null if you
use it in actionScript it should be just 
private function initApp():void{

chartXML.send();

chartXML.addEventListener(ResultEvent.RESULT,onResult);

}

private function onResult(event:ResultEvent):void{

 //u get event.result



}



----- Original Message ----
From: Brad Bueche <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, February 12, 2008 12:30:32 PM
Subject: [flexcoders] XML, HTTPSerivce, & Setting dataProvider in Action
Script





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(lineOfBusine ss) 
                 { 
                         case "ABC": 
                        chartXML.url= "http://hostname/Data/xmlData_
ALL_ABC_12Months_All_ Days_2007. php";         
                        chartXML.send( ); 
                        [....] 
                        line_Chart.dataProv ider = 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="{categoryAxisTitleSt ring}" /> 
   </mx:horizontalAxis> 
</mx:LineChart>


  _____  

Never miss a thing. Make Yahoo
<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs> your
homepage. 



 

Reply via email to