two further problems with the flot.selection plubin (version 3.2.2)

53 views
Skip to first unread message

MissyLaMotte

unread,
Jul 18, 2019, 10:05:33 AM7/18/19
to Flot graphs
I updated Flot from the old 0.8.3 version (the last one still available as .zip file) to the current one from npm.

Now I have two problems with the flot.selection plugin which I did not notice before:

1. my 'plotselected' event handler is always called twice (with the same ranges). I can build an ugly workaround to detect if I am called for the second time, but I would like to prevent that.

2. clearSelection() does not work, at least not from inside the plotselected event handler ... the only way to make the selection disappear is to click on the plot ... I even change some stuff in the plot, call setupGrid and draw and the selection is still visible afterwards.

Andrew Dove

unread,
Jul 18, 2019, 10:39:19 AM7/18/19
to Flot graphs
I tried both the examples that use selection - zoom and selection and they both did not exhibit the behaviors you describe below.  Can you try those also yourself and verify this?

MissyLaMotte

unread,
Jul 19, 2019, 2:45:46 AM7/19/19
to Flot graphs
Argh ... I found it. My mistake. I included the distribution version of jquery.flot.js, and then included the selection plugin on top of that, because I was not aware that that is included in the distribution version already. That's why I ended up with two calls to the plotselected handler und why the selection wasn't cleared correctly.

So all standard "plugins" are in the distribution version already, right? Is there a list somewhere in the API documentation and a rough guide of the extra functionality that provides?

Andrew Dove

unread,
Jul 19, 2019, 9:36:48 AM7/19/19
to Flot graphs
The files are listed in gulpfile.js that is used to build the distro
Reply all
Reply to author
Forward
0 new messages