Open GoogleCodeExporter opened 9 years ago
I'd like the ability to pass in handlers like a lot of jq plugins allow. Something like this: $.plot($("#placeholder"), [ { label: "sin(x)", data: d1}, { label: "cos(x)", data: d2}, { label: "tan(x)", data: d3} ], { series: { lines: { show: true }, points: { show: true } }, plothover: function (event, pos, item) { $("#x").text(pos.x.toFixed(2)); $("#y").text(pos.y.toFixed(2)); if (item) { if (previousPoint != item.dataIndex) { previousPoint = item.dataIndex; $("#tooltip").remove(); var x = item.datapoint[0].toFixed(2), y = item.datapoint[1].toFixed(2); showTooltip(item.pageX, item.pageY, item.series.label + " of " + x + " = " + y); } } else { $("#tooltip").remove(); previousPoint = null; } }, plotclick: someFunction }
Original issue reported on code.google.com by matt.mot...@gmail.com on 4 Oct 2011 at 11:00
matt.mot...@gmail.com
Original comment by dnsch...@gmail.com on 1 May 2012 at 12:11
dnsch...@gmail.com
Original comment by dnsch...@gmail.com on 7 May 2012 at 11:54
Original issue reported on code.google.com by
matt.mot...@gmail.com
on 4 Oct 2011 at 11:00