You should use legendItemClick as following code
plotOptions: { line: { events: { legendItemClick: function () { alert('I am an alert');
Here is a working fiddle that shows a warning when you click on legends, like Tokyo, and then hide the Tokyo line.
See also the plotOptions documentation for this event. If you need to post this, this may vary depending on what type of chart you are using.
Prasenjit Kumar Nag May 15 '12 at 16:39 2012-05-15 16:39
source share