If anyone is interested.. I sorted it Forgotten to add a line in the function
chartArray=new Array(); --- In [email protected], "yaagcur" <[EMAIL PROTECTED]> wrote: > > Bit Johnny-come-lately, but I'm trying to do the same thing > Not from a computing background, but did something similar to this in > Flash which seemed to work > > <![CDATA[ > var v:Object > var chartArray:Array > var i:Number > > function ResultHandler(result):Void > { > v = result; > for (i=0; i<v.length; i++) > { > chartArray.push({field1:v.getItemAt(i).field1,fiel > d2:v.getItemAt(i).field2}); > > } > > } > ]] > > If I use v as the dataprovider for a datagrid everything works fine > In a chart, only the field showing as a categoryField works > So I am trying to construct an Array but the chartArray does not seem > to form as I have set it up > Anyone know where I'm going wrong? > > > --- In [email protected], "Ely Greenfield" <[EMAIL PROTECTED]> > wrote: > > > > > > > > Rich -- the charts will work fine on objects instead of xml, but > they > > are written to work only off of a flat array of objects. As you have > > discovered, there is no way to point a particular series to look > down > > into a nested reference in the dataprovider for its data. > > > > This is a great feature request, so if you want to submit it to the > wish > > list that would be great. In the meantime, you'll have to masssage > your > > data into a flat list, either on the client or the server, before > > displaying it in the chart. > > > > Ely. > > > > > > -----Original Message----- > > From: [email protected] [mailto:flexcod > [EMAIL PROTECTED] On > > Behalf Of Rich Tretola > > Sent: Thursday, June 16, 2005 5:42 AM > > To: [email protected] > > Subject: [flexcoders] Re: Charting > > Importance: High > > > > Has anyone done any charting with complex objects or are all using > only > > basic xml for charting data ? > > > > Rich > > > > On 6/15/05, Rich Tretola <[EMAIL PROTECTED]> wrote: > > > All of the macromedia examples are using xml for their datasource > and > > > then hard coding the node name into the column series. Example: > > > > > > XML: > > > <data> > > > > > > <result month="Jan-04" average="203443"> > > > <apple>224254</apple> > > > <orange>221819</orange> > > > <banana>164256</banana> > > > </result> > > > > > > <result month="Feb-04" average="180365"> > > > <apple>191012</apple> > > > <orange>217965</orange> > > > <banana>132120</banana> > > > </result> > > > > > > </data> > > > > > > > > > Column Series: > > > <mx:series> > > > <mx:Array> > > > <mx:ColumnSeries yField="apple" name="Apple"/> > > > <mx:ColumnSeries yField="orange" name="Orange"/> > > > <mx:ColumnSeries yField="banana" name="Banana"/> > > > </mx:Array> > > > </mx:series> > > > > > > Is there anyway to use a dataprovider specific to the > ColumnSeries > > > Array or wrap the ColumnSeries tag with a repeater ? I can't > seem to > > > get either to work. > > > > > > My data consists of an array of year objects with a sub array of > > > quarter objects. > > > > > > Object FiscalYear: > > > year:String > > > revenue:Number: 100000 > > > Array: quarters > > > Object Quarter: > > > year:String: > > > quarter:String > > > revenue:Number > > > > > > I want to have a grouped chart with a grouping for each year that > has > > > 4 columns representing each quarter. > > > > > > Rich > > > > > > > > > > > Yahoo! Groups Links > ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- 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/

