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>

Reply via email to