Ely/Tom, Thanks for the replies!
> As far as accessing the chart items...Tom is right, subclassing and > exposing the chartItems out of the renderData is the way to go. Ok; this is probably a subclassing-neophyte quetion, but is the following what you mean?: 1]extend ColumnSeries.as (not ColumnChart.as!) in a new class 2]add a new public getter method to simply return the private var _renderData 3]Use this new CustomColumnSeries in my app, which now has a publically accessible _renderData array > About findDataPoints() - various series types optimize under > the assumption that their data never overlaps Do you know where the different chart types make this distinction? If I'm subclassing ColumnSeries anyway, it would be nice (for this and other uses) to override findDataPoints() to sometimes return multiple or all items (that whole 'show all dataTips' thing, for example). I see that findDataPoints() is defined in ChartBase (which all charts inherit from), so I'm not seeing where the different chart types apply differing logic to allow/disallow multiples. many thanks, -Peter [BTW, my ultimate goal here is to highlight/unhighlight column items by adjusting the alpha of their itemRenderers. I was elated to find that the following works when clicking one chartItem: event.hitData.chartItem.itemRenderer.alpha = 0.3; Wonderfully simple way to visually distinguish the selected chartItem! Only problem is, I need to loop through the other chartItems first, to make sure their alpha is 1 (to reset any previously-clicked chartItem). So I just need a way to say "reset the alpha of all items in this series to x".] > > > > As far as accessing the chart items...Tom is right, subclassing and > exposing the chartItems out of the renderData is the way to go. > > > > Ely. > > > > > > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Peter Demling > Sent: Friday, June 08, 2007 8:41 AM > To: [email protected] > Subject: [flexcoders] Help - need to access all chartItems! (bug in > findDataPoints()?) > > > > I'm trying to refer to all of my ColumnChart's chartItems at runtime, > but findDataPoints() only ever returns 1 object in its hitData array, > no matter how large I set the mouseSensitivity with > dataTipMode="multiple" (I also get a compile-time error when trying to > directly refer to the "items" array of my ColumnSeries, even though > this array of chartItems exists at run time). > > So first off, any suggestions for how to refer to all currently > displayed chartItems - without using findDataPoints - would be > immensely helpful (it's the final piece in a quick-and-easy way to > turn column highlights on and off, so I can post that when I solve > this!). > > The larger issue is that there might be a bug in findDataPoints(), > since - except for PlotChart - no chart I've found will display > multiple dataTips in the same series. Below is the example from the > Developer's Guide on dataTipMode, where I've set the mouseSensitivity > to 10000 and replaced one of the BarSeries with a PlotSeries: you can > see how it will only show multiple dataTips (as returned from > findDataPoints) for the PlotSeries. > > Thanks for any advice! > > -Peter Demling > Lexington, MA > > <?xml version="1.0"?> > <!-- charts/DataTipsMultiple.mxml --> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> > <mx:Script><![CDATA[ > import mx.collections.ArrayCollection; > [Bindable] > public var expenses:ArrayCollection = new ArrayCollection([ > {Month:"Jan", Profit:2000, Expenses:1500}, > {Month:"Feb", Profit:1000, Expenses:200}, > {Month:"Mar", Profit:1500, Expenses:500} > ]); > ]]></mx:Script> > <mx:Panel title="Bar Chart"> > <mx:CartesianChart id="myChart" > dataProvider="{expenses}" > showDataTips="true" > mouseSensitivity="10000" > dataTipMode="multiple" > > > <mx:verticalAxis> > <mx:CategoryAxis > dataProvider="{expenses}" > categoryField="Month" > /> > </mx:verticalAxis> > <mx:series> > <mx:BarSeries > yField="Month" > xField="Profit" > /> > <mx:PlotSeries > yField="Month" > xField="Expenses" > /> > </mx:series> > </mx:CartesianChart> > <mx:Legend dataProvider="{myChart}"/> > </mx:Panel> > </mx:Application> >

