I see. It looks like you need to put your seven values (onesales, twosales, 
threesales, etc) into an array.  You could implement the dataProvider API on 
your VO, but that seems like overkill  I'd suggest just copying your seven 
values into an array on selectionChange, and stuff that array in as a 
dataProvider for the drilldown chart.
 
Ely.
 

________________________________

From: flexcoders@yahoogroups.com on behalf of digital_eyezed
Sent: Mon 8/8/2005 11:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Charting from a TreeNode



Ok,

I have a tree on the left of the app, which is populated from the
returned InfoVO Array, this works no problem. On the right of the
app is a panel with two columncharts, the top one takes the same
dataProvider as the tree on the left and it shows the data okay for
all infoVO's. Under that chart is another chart (a kind of drill
down chart) which when you click on the infoVO in the tree should
show the data specific to that infoVO, thats about it. Each info VO
has seven data elements (sales associated to each day of the week)
and a label (the Id of each infoVO). I can't get the infoVO
(drilldown) to show the data on the bottom chart.

Sorry for not making it clear enough before.




--- In flexcoders@yahoogroups.com, "Ely Greenfield" <[EMAIL PROTECTED]>
wrote:
>
>
> Still not quite clear on what you're trying to do here. You have
an array of InfoVO objects...but you don't want to display the
entire array, just a subset of the array? Is that correct?
>
> Ely.
> 
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of digital_eyezed
> Sent: Monday, August 08, 2005 9:28 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Charting from a TreeNode
> Importance: High
>
> This is the VO:
>
> class uk.co.company.InfoVO
> {
>       public function InfoVO()
>       {
>       _remoteClass = "uk.co.company.InfoVO";
>       }
> public var _remoteClass : String;
>
> public var label:String;
> public var sevensales:Number;
> public var sixsales:Number;
> public var fivesales:Number;
> public var foursales:Number;
> public var threesales:Number;
> public var twosales:Number;
> public var onesales:Number;
>
>
> public function setLabel(lab:String):Void{
>       this.label = lab;
> }
> public function setSevenSales(sales:Number):Void{
>       this.sevensales = sales;
> }
> public function setSixSales(sales:Number):Void{
>       this.sixsales = sales;
> }
> public function setFiveSales(sales:Number):Void{
>       this.fivesales = sales;
> }
> public function setFourSales(sales:Number):Void{
>       this.foursales = sales;
> }
> public function setThreeSales(sales:Number):Void{
>       this.threesales = sales;
> }
> public function setTwoSales(sales:Number):Void{
>       this.twosales = sales;
> }
> public function setOneSales(sales:Number):Void{
>       this.onesales = sales;
> }
> }
>
> The RemoteObject returns an array of these. I want to show the
data from the onesales ... sevensales with the label as the
categoryfield label.
>
>
> Cheers,
>
> Iain
>
> --- In flexcoders@yahoogroups.com, "Ely Greenfield" <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > Can you send a sample of the data you're loading from the RO? And
> point
> > out which sub-section you want to display in the chart.
> >
> >
> > Thanks,
> > Ely.
> > 
> >
> > -----Original Message-----
> > From: flexcoders@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> > Behalf Of digital_eyezed
> > Sent: Monday, August 08, 2005 9:20 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] Charting from a TreeNode
> >
> > I have a tree which is populated from a return from a
RemoteObject
> call.
> > The returned object is an array of VO objects. The tree populates
> no
> > problem. I also have a chart which is populated from the the
same
> > RemoteObject Result. This chart is a simple column chart which
> shows
> > seven elements of each VO in the array.
> >
> > What I want to do now is populate another chart (chart2) with
just
> the
> > seven elements of the VO from the selected node in the tree. I
have
> > tried to set the dataProvider of the chart2 to tree.selectedItem
> and
> > even tried to build another VO object based on the tree change
> event and
> > set that as the dataProvider, no matter what I try the second
> chart will
> > not populate.
> >
> > Here is the mxml:
> >
> > <mx:Panel title="Machines" width="250" height="100%"
> > panelBorderStyle="roundCorners">
> >             <mx:Tree id="tree"
> > dataProvider="{getEverything.getSites.result}" width="100%"
> > height="100%" cellPress="showStuff(event)"/>
> >         </mx:Panel>
> >         </mx:VBox>
> >         <mx:VBox width="100%" height="100%">
> >         <mx:Panel width="100%" height="50%" marginTop="1"
> > marginBottom="1"  marginLeft="1" marginRight="1">
> >         <mx:VBox width="100%" height="100%">
> >             <mx:ColumnChart id="chart" dataProvider="{results}"
> > dataTipFunction="formatDataTipSales" showDataTips="true"
> > width="100%" height="100%">
> >            
> >                     <mx:horizontalAxis>
> >                         <mx:CategoryAxis
> > dataProvider="{results}" categoryField="label"/>
> >                     </mx:horizontalAxis>
> >            
> >                     <mx:series>
> >                         <mx:Array>
> >                             <mx:ColumnSeries yField="sevensales"
> > name="Sales -7"/>
> >                             <mx:ColumnSeries yField="sixsales"
> > name="Sales -6"/>
> >                             <mx:ColumnSeries yField="fivesales"
> > name="Sales -5"/>
> >                             <mx:ColumnSeries yField="foursales"
> > name="Sales -4"/>
> >                             <mx:ColumnSeries yField="threesales"
> > name="Sales -3"/>
> >                             <mx:ColumnSeries yField="twosales"
> > name="Sales -2"/>
> >                             <mx:ColumnSeries yField="onesales"
> > name="Sales -1"/>
> >                         </mx:Array>
> >                     </mx:series>
> >            
> >                 </mx:ColumnChart>
> >                 <mx:ColumnChart id="chart2"
> > dataProvider="{tree.selectedItem}"
> > dataTipFunction="formatDataTipSales" showDataTips="true"
> > width="100%" height="100%">
> >            
> >                     <mx:horizontalAxis>
> >                         <mx:CategoryAxis
> > dataProvider="{tree.selectedItem}" categoryField="label"/>
> >                     </mx:horizontalAxis>
> >            
> >                     <mx:series>
> >                         <mx:Array>
> >                             <mx:ColumnSeries yField="sevensales"
> > name="Sales -7"/>
> >                             <mx:ColumnSeries yField="sixsales"
> > name="Sales -6"/>
> >                             <mx:ColumnSeries yField="fivesales"
> > name="Sales -5"/>
> >                             <mx:ColumnSeries yField="foursales"
> > name="Sales -4"/>
> >                             <mx:ColumnSeries yField="threesales"
> > name="Sales -3"/>
> >                             <mx:ColumnSeries yField="twosales"
> > name="Sales -2"/>
> >                             <mx:ColumnSeries yField="onesales"
> > name="Sales -1"/>
> >                         </mx:Array>
> >                     </mx:series>
> >            
> >                 </mx:ColumnChart>
> >             </mx:VBox>
> >         </mx:Panel>
> >
> > Thanks,
> >
> > Iain
> >
> >
> >
> >
> > ------------------------ Yahoo! Groups Sponsor ------------------
--
> ~-->
> > <font face=arial size=-1><a
> >
>
href="http://us.ard.yahoo.com/SIG=12hn822fb/M=362335.6886445.7839731.
> 151
> >
>
0227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123525200/A=2894361/R=0/SI
> G=1
> >
>
3jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivid
> e/?
> > source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In low
income
> > neighborhoods, 84% do not own computers. At Network for Good,
help
> > bridge the Digital Divide!</a>.</font>
> > -----------------------------------------------------------------
--
> -~->
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor --------------------
~--> <font face=arial size=-1><a
href="http://us.ard.yahoo.com/SIG=12huh24kl/M=362131.6882499.7825260.
1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123525724/A=2889191/R=0
/SIG=10r90krvo/*http://www.thebeehive.org
> ">Get Bzzzy! (real tools to help you find a job) Welcome to the
Sweet Life - brought to you by One Economy</a>.</font>
--------------
------------------------------------------------------~->
>
> --
> Flexcoders Mailing List
> FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%
40yahoogroups.com
> Yahoo! Groups Links






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links










------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h8bvtrq/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123540957/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<<winmail.dat>>

Reply via email to