Following on from my message about retrieving the series array from
the clicked LegendItem using LegendMouseEvent, a little digging put me
back into the "is it me or is it me?" mode.

I read LiveDocs, work out what is passed and then try and trap it and
there is nothing there :-) Latest scenario:

<mx:Legend id="chartLegend" itemClick="chartFilter(event)" ...

private function chartFilter(event:LegendMouseEvent):void{
   var refLegendItem:LegendItem = event.item;
   var refChartElement:IChartElement = event.item.element;
   var refItemSource:Object = event.item.source

I pushed the event info into vars to see if this made any difference (No)

LiveDocs says that clicking on the Legend produces a LegendMouseEvent
where LegendMouseEvent.item = The item in the Legend on which this
event was triggered. LiveDocs then says that LegendItem .element=The
chart element that is responsible for generating this legend item, and
that LegendItem.source=reference to the data series that the
LegendItem was generated. 

Debugging function chartFilter, there is an event.item, and it has the
correct .label text. But element and source are null. 

Any help is much appreciated. Thanks,

Mic.

Reply via email to