I made a combination of Flot series-toggle sample with Flot tooltip. but I get errors when I have multiple series and hide some of them.
in plothover, pos.y might be undefined if the first chart is hidden. Instead, there might be y1, y2, y3 ... (according to show\hide chart?)
Relevant code:
$("#placeholder").bind("plothover", function (event, pos, item) {
var str = "(" + pos.x.toFixed(2) + ", " + pos.y.toFixed(2) + ")";
$("#hoverdata").text(str);
. . .
Is there a simple function which return pos.y, y1, y2, y3 as array? Or do I need to test each if it is not undefined?