Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Tooltip to Timeline Chart #99

Closed
Rperry2174 opened this issue Feb 25, 2021 · 2 comments
Closed

Add Tooltip to Timeline Chart #99

Rperry2174 opened this issue Feb 25, 2021 · 2 comments
Labels
frontend Mostly JS code good first issue Good for newcomers

Comments

@Rperry2174
Copy link
Contributor

Rperry2174 commented Feb 25, 2021

We currently use the Flot library for our timeline. We'd like to add a tooltip that moves horizontally along the X axis and tells you what timestamp is currently being hovered:

This is an example taken from ApexCharts, but we'd like to recreate this (tooltip only) in Flot library
ezgif com-gif-maker

Here is link to Flot tooltip plugin

The biggest goal is to just be able to better understand what is being hovered. I'm open to other "styles" of tooltip it just has to exist in some way that lets you know what particular time you are hovering over

@shaleynikov
Copy link
Contributor

Hey, got deeper into how timeline is rendered and here is my findings:

Flot tooltip plugin has a lot of logic built in. Using it for this purpose will require either:

  1. Tooltip "target" to be hoverable (which isn't possible now as currently data chunks are displayed as "vertical lines" and not, for instance, bars) (https://github.com/krzysu/flot.tooltip/blob/master/js/jquery.flot.tooltip.js#L177)
  2. Certain draw options to be enabled (https://github.com/krzysu/flot.tooltip/blob/master/js/jquery.flot.tooltip.js#L179)

For now I don't see an easy way to achieve required functionality with current tooltip plugin.

I would suggest to create a new plugin relying on Flot plugin system (https://github.com/flot/flot/blob/master/docs/PLUGINS.md) rather than re-using existing flot-plugin

@Rperry2174
Copy link
Contributor Author

Yeah I suspected this might be the better path too so if you think that would work better / be cleaner than definitely happy to go that route @shaleynikov

cc @eh-am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Mostly JS code good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants