Get clicked label in jQuery Flot "plotclick" event -
so have method in jquery catching click events on flot chart:
$("#placeholder").bind("plotclick", function (event, pos, item) { alert("clicked"); });
i know clicked values item['datapoint'] array. can find label of curve clicked?
thanks.
look @ item.series.label
:
$("#placeholder").bind("plotclick", function (event, pos, item) { if (item) { alert(item.series.label); } });
fiddle here.
Comments
Post a Comment