Flot tooltip plugin and hover plugin.

45 views
Skip to first unread message

Jonathan Crow

unread,
Jun 26, 2019, 5:04:09 AM6/26/19
to Flot graphs
Hi,

There is a tooltip plugin we use as an essential part of our application to provide user with data about the signals. It has not been maintained since 2016 but the author would be willing to let someone else maintain it.

Since the plugin has a dependency on the hover plugin, I wonder, would you be willing to add the tooltip plugin to flot so the plugins are in one place?

Also, previously, I was able to momentarily disable the hovering without having to reinitialize the chart. The reason behind this was to not have the points hoverable (and thus, launch the tooltip drawing) while using the selection plugin. Would you have anything against on adding checks to the hover plugin if the plot is still clickable/hoverable (i.e., the option has not been set to false)  and only launch the plothover/plotclick event if so?

Cheers,
JC

Andrew Dove

unread,
Jun 26, 2019, 8:59:14 AM6/26/19
to Flot graphs
I am very interested in a tooltip plugin - was about to start creating one myself. I have created a new repo called flot-plugins which I am working on populating with our plug-ins (its not quite ready yet). So we could put the plugin there. If there is documentation and tests for it that would be great also.

Jonathan Crow

unread,
Jun 26, 2019, 9:35:08 AM6/26/19
to Flot graphs
Nice. The plugin is easy to use and it has plenty of documentation in https://github.com/krzysu/flot.tooltip

Basically the plugin creates an HTML Element, which can be styled with the CSS. It has some formatted strings one can use to populate the tooltip, but its real strength is that one can just create a function that returns an HTML code string to fully customize the tooltip's contents. There are no tests for it, however.

Cheers,
JC

Andrew Dove

unread,
Jun 26, 2019, 11:47:41 AM6/26/19
to Flot graphs
OK, I'll pull this into flot-plugins. On the second part of your question - not firing the event when the plot is not hoverable makes sense to me.

Jonathan Crow

unread,
Jun 27, 2019, 3:28:36 AM6/27/19
to Flot graphs
OK, thanks. I'll implement the withholding of the events, create test cases for it and make a pull request.
Reply all
Reply to author
Forward
0 new messages