Closed GoogleCodeExporter closed 9 years ago
Ah, I think it's because you need to set options.grid.hoverable to true.
The boundaries between plugin and core Flot are still a bit fuzzy at the
moment. I
don't consider the API finalized.
Original comment by olau%iol...@gtempaccount.com
on 20 Jan 2010 at 1:08
... set to true, else the event doesn't fire (take a look at the Flot code if
in doubt).
Original comment by olau%iol...@gtempaccount.com
on 20 Jan 2010 at 1:09
It doesn't works with hoverable : the plugin and the html page are in
attachements ↓ .
Original comment by Pr.Dor...@gmail.com
on 20 Jan 2010 at 9:25
Attachments:
Hi,
It works if you do it as shown below.
plot.hooks.bindEvents.push(function (plot, eventHolder) {
eventHolder.mousemove(function (event) {
console.log ("Mouse over [" + event.pageX + ", " + event.pageY + "]");
});
});
Original comment by nadeeshy...@gmail.com
on 9 Mar 2010 at 5:54
Sorry, coming to think of it, it's perhaps because the eventHolder is where you
should listen for native events (it's the canvas) whereas the plot actually
fires
events on another element, the placeholder (the initial div). You can get that
element with plot.getPlaceholder(), at least on Flot in SVN.
Sorry again. I have updated API.txt with an extra paragraph:
"Note that custom plot events generated by Flot are not generated on
eventHolder, but
on the div placeholder supplied as first argument to the plot call. You can get
that
with plot.getPlaceholder() - that's probably also the one you should use if you
need
to fire a custom event."
Original comment by olau%iol...@gtempaccount.com
on 15 Mar 2010 at 11:15
Original comment by dnsch...@gmail.com
on 1 May 2012 at 10:27
Original issue reported on code.google.com by
Pr.Dor...@gmail.com
on 19 Dec 2009 at 9:40