import mx.collections.ArrayCollection;
import mx.charts.events.ChartItemEvent;
[Bindable]
private var productSales:ArrayCollection;
[Bindable]
private var logData:String;
public function myListener(e:ChartItemEvent):void {
logData = "Event: " + e.type +
"\n PC: " + e.hitData.item.PC
+"\n Mac: " + e.hitData.item.Mac +
"\n Gadgets: " + e.hitData.item.Gadgets;
eventLog.verticalScrollPosition=eventLog.verticalScrollPosition+100;
}
private function initApp():void {
productSales = new ArrayCollection( [
{ Quarter: "1", PC: 10000, Mac: 3000, Gadgets: 1000, Total: 14000 },
{ Quarter: "2", PC: 12000, Mac: 4000, Gadgets: 2000, Total: 18000 },
{ Quarter: "3", PC: 15000, Mac: 8000, Gadgets: 5000, Total: 28000 },
{ Quarter: "4", PC: 20000, Mac: 10000, Gadgets: 9000, Total: 39000 }
]);
columnChart.addEventListener(ChartItemEvent.ITEM_MOUSE_DOWN,myListener);
}