Reputation: 55
hi i am trying to insert event handler to each line on the legend of jqplot something like
$('#chart3').bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) { alert(1);});); but for the legend lines
Upvotes: 0
Views: 2454
Reputation: 14948
This worked for me:
$('#chart-id tr.jqplot-table-legend').bind('click', function() {
alert($(this).children().last().text());
});
So what this will do is alert
the name of the series.
Upvotes: 3