View Full Version : how to trap Chart Legend item click

damiano colombo
18 Apr 2012, 11:49 PM
I'm using a line chart with a legend. when a user clicks on a legend items the chart hides/shows its line in the chart, and that's good. Now i want to add an additional behavior the the click event (I want to reload the data). Haw can I add an additional handler to the chart legend item click event?
I made this way:

onChartRendered:function (chart, eOpts)
notificationsChart.legend.items[0].on("click",this.onChartMouseDown,this );

I see in the chrome debugger that my new handler is attached, but its code is never executed.
Any idea?