Hi Ely, The final bar chart should be a comparison of a customer's Ratings.
Customers are rated 1-5. 1 being poor. 5 being the best. So the chart should be something like: x: RATING FOR CATEGORY (delivery, quality, payment) y: RATING BY VALUE (1-5) Since I am using a repeater, I am clueless about how to access the dataProvider of the CatagoryAxis as well as the dataProivder of the chart. I can see how I would communiate with the chart, but not the axis. On 8/29/05, Ely Greenfield <[EMAIL PROTECTED]> wrote: > > > OK, here's what I see from your code. Your vertical Axis is a > CategoryAxis, with a categoryField but no dataProvider. That means it > has no source for its categories, and thus won't show any categories. > Which means your BarSeries won't show any bars, because there's no > categories to map the bars too. > > Can you describe in a little more details what you want the final chart > to look like? > > Ely. > > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of dave buhler > Sent: Monday, August 29, 2005 11:15 AM > To: flexcoders@yahoogroups.com > Subject: Re: [flexcoders] Charting Components w/in Repeater > Importance: High > > Hi Ely, > > I made some progress talking to the chart. It now shows a range up to > number 2, so now I know I can work with it: > > > > But it still doesn't populate. > > Here are my code changes: > > ViewHelper: > //---------------------------------------------------------------------- > --- > > public function setChart ( event : Object ) : Void > { > arrChart = []; > arrChart.push( > [ > {y:5,delivery:2}, > {y:5,payment:5}, > {y:5,quality:5} > ]) > view.idChart[event.target.instanceIndex].dataProvider = > arrChart; > } > > MXML > > <!-- //////////////////////////// CHART > //////////////////////////// --> > <mx:BarChart id="idChart" > width="100%" > height="100%" > marginTop="10" > type="stacked" > > creationComplete="ratingsViewHelper.setChart( event )"> > > > <mx:verticalAxis> > > <mx:CategoryAxis categoryField="y" /> > > </mx:verticalAxis> > > <mx:series> > > <mx:Array> > > <mx:BarSeries xField="delivery" name="delivery"/> > > <mx:BarSeries xField="payment" name="payment"/> > > <mx:BarSeries xField="quality" name="quality"/> > > </mx:Array> > </mx:series> > </mx:BarChart> > > On 8/29/05, Ely Greenfield <[EMAIL PROTECTED]> wrote: > > > > > > > > Your (a) thought looks like a likely candidate. CategoryAxis objects > > don't inherit their dataprovider from the chart...you need to assign > > them explicitly. > > > > Ely. > > > > > > -----Original Message----- > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] > > On Behalf Of dave buhler > > Sent: Saturday, August 27, 2005 2:34 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] Charting Components w/in Repeater > > Importance: High > > > > I am unable to get the Charting Component to Work within a Repeater. > > > > Here is what I am doing: > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > > > 1) The information being returned from Coldfusion is returned as a > > struct Result (object #2) > > .....AUTHORCOUNT: 13 > > .....RATEDCOUNT: 1 > > .....GETRATINGSFEEDBACK (object #3) > > .......[0] (object #4) > > ...............DELIVERY: 5 > > ...............PAYMENT: 2 > > ...............QUALITY: 4 > > ...............R_ID: 14337 > > .......[1] (object #6) > > ...............DELIVERY: 3 > > ...............PAYMENT: 0 > > ...............QUALITY: 4 > > ...............R_ID: 2732 > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > > > 2) I take this struct/object and convert it to an array of named > > objects: > > > > arrChart = []; > > for ( var i in event.result.GETRATINGSFEEDBACK ){ > > arrChart.push( > > {delivery:event.result.GETRATINGSFEEDBACK[i].DELIVERY > > , > > payment:event.result.GETRATINGSFEEDBACK[i].PAYMENT > > , > > quality:event.result.GETRATINGSFEEDBACK[i].QUALITY} ); } > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > > > 3) Then, I populate the repeater's forms within the repeater: > > > > view.rptRatings.dataProvider = event.result.GETRATINGSFEEDBACK; > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > > > 4) When the repeater fires each (creationComplete event), I pass the > > repeater's index to a function that attempts to set the current chart > > being created with the object (delivery, payment, quality) in the X > > position of the array initalized earlier. > > > > public function setChart ( index : Number ) : Void { > > var i = index > > view.rptRatings[i].idChart.dataProvider = arrChart[i]; > > // is is showing the right index..... > > // arrChart[i].delivery is showing the right value } > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > > > 5) Then, I rub Buddah's belly and attempt to create the chart, but > > nothing happens. > > <?xml version="1.0" encoding="utf-8"?> <mx:VBox > > xmlns:mx="http://www.macromedia.com/2003/mxml" > > > > xmlns:ratings="com.mydomain.source.view.profiles.ratings.*"/> > > > > <ratings:RatingsViewHelper > > id="ratingsViewHelper" /> > > > > <mx:Repeater id="rptRatings" > > > <!-- //////////////////////////// CHART //////////////////////////// > > --> > > > > <mx:BarChart id="idChart" > > width="100%" > > height="100%" > > type="stacked" > > creationComplete="ratingsViewHelper.setChart( > > event.target.repeaterIndices[0] )"> > > > > <mx:verticalAxis> > > <mx:CategoryAxis name="Project > > > Ratings" categoryField="arrChart" /> > > </mx:verticalAxis> > > > > <mx:series> > > <mx:Array> > > <mx:BarSeries > > xField="delivery" name="Delivery"/> > > <mx:BarSeries > > xField="payment" name="Payment"/> > > <mx:BarSeries > > xField="quality" name="Quality"/> > > </mx:Array> > > </mx:series> > > </mx:BarChart> > > > > </mx:Repeater> > > </mx:VBox> > > > > ---------------------------------------------------------------------- > > -- > > ---------- > > My only thoughts as to possible problems would center on: > > a) the categoryField has no object (strings or array of objects) being > > > assigned to it. > > b) I am failing to reference the dataProvider(s) correctly. The > > categoryAxis throws an error when compiled if I assign it an ID, so I > > see no way to reference it programatically. > > > > Any assistance is welcome. > > Dave > > > > > > > > -- > > 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 > > > > > > > > > > > > > > > > > > > > -- > 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 --------------------~--> 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/