Hi
I have a requirement where i have to update the Legend item Label on
mousemove on a chart. Basically i have to send the hit data of
relevent series to LegendItem component. I am not sure how to
communicate to legenditem
Thx in advance
Arun
================================ code for call to component
================================
For each dynamically created series
series1.setStyle("lineStroke",seriesStroke);
var legendMarkerRenderer:ClassFactory = new ClassFactory(ChartLegendItem);
series1.setStyle("legendMarkerRenderer",legendMarkerRenderer);
=======================code of ChartLegendItem ===============
package icc.charting.component {
import mx.charts.LegendItem;
import mx.controls.CheckBox;
public class CheckBoxLegendItem extends LegendItem {
private var cb : CheckBox;
override protected function createChildren():void {
super.createChildren();
cb = new CheckBox();
cb.selected = true;
addChild( cb );
}
override protected function measure():void {
super.measure();
// add some extra space for the checkBox
measuredWidth += 30;
}
override protected function
updateDisplayList(unscaledWidth:Number,
unscaledHeight:Number):void {
super.updateDisplayList( unscaledWidth, unscaledHeight
);
//move the checkbox to the right
cb.move( unscaledWidth - 30, 0 );
}
}
}