you have it set in mxml, chartXML.lasResult
 <mx:CategoryAxis id="cat1"  dataProvider= "{chartXML.lastResult .month[month_ 
number].day}" 
           categoryField= "{categoryFieldString}" title="{categoryAxisTitleSt 
ring}" /> 


----- Original Message ----
From: Brad Bueche <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Tuesday, February 12, 2008 1:29:36 PM
Subject: RE: [flexcoders] XML, HTTPSerivce, & Setting dataProvider in Action 
Script

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] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf 
Of Sherif Abdou
Sent: Tuesday, February 12, 2008 1:39 PM
To: [EMAIL PROTECTED] ups.com
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] com>
To: [EMAIL PROTECTED] ups.com
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 your homepage. 



      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Reply via email to