question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tooltips or an API to support their implementation

See original GitHub issue

I like to have tooltips instead of the legend to show the currently hovered value. Would you consider implementing tooltips yourself or alternatively provide an API like getValuesAtCursor to allow a implementation with libraries like popper.js? Something like this:

https://codepen.io/FezVrasta/pen/bWezaY

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
silverwindcommented, Dec 7, 2019

https://codesandbox.io/s/uplot-tooltip-placement-l4b9u

I’m happy with the result. To change it to be confied to the chart area, set bound = plot. I opted to hide .cursor-hz always and only show .cursor-vt when the mouse is over the chart. Maybe this is something you want to consider supporting more directly (e.g. a option to hide a cursor line and some methods to show/hide them). Also maybe cursorenter and cursorleave events might be useful.

(For some reason that Sandbox only works in Firefox for me)

0reactions
leeoniyacommented, Dec 29, 2019

the third constructor param can now accept an HTMLElement container to append into. this signature also defers firing hooks until after dom insertion.

https://github.com/leeoniya/uPlot/blob/master/demos/cursor-tooltip.html#L108

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tooltips | Android Developers
A tooltip is a small descriptive message that appears near a view when users long press the view or hover their mouse over...
Read more >
Add tooltips to Power BI custom visuals
Tooltips are an elegant way of providing more contextual information and detail to data points on a visual. The Power BI tooltips API...
Read more >
Tooltips | Charts
Tooltips are the little boxes that pop up when you hover over something. (Hovercards are more general, and can appear anywhere on the...
Read more >
Tooltips - Material Design
A tooltip is displayed upon tapping and holding a screen element or component (on mobile) or hovering over it (desktop). Continuously display the...
Read more >
Tooltip Implementation - Documentation - Webix
Tooltip appears above other UI-related components, which makes it similar to window and popup. Tooltip is connected with a component or its item...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found