Hi Peter.  About findDataPoints() - various series types optimize under
the assumption that their data never overlaps (i.e., a columnSeries
assumes its columns don't sit on top of each other, so you never need to
see tips for multiple columns at once).

 

As far as accessing the chart items...Tom is right, subclassing and
exposing the charItems out of the renderData is the way to go.

 

Ely.

 

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Demling
Sent: Friday, June 08, 2007 8:41 AM
To: flexcoders@yahoogroups.com
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>

 

<<image001.jpg>>

<<image002.jpg>>

Reply via email to