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

tooltip.show() not working in all cases #3187

Closed
Patrick-Keenan opened this issue Apr 18, 2023 · 1 comment
Closed

tooltip.show() not working in all cases #3187

Patrick-Keenan opened this issue Apr 18, 2023 · 1 comment
Labels

Comments

@Patrick-Keenan
Copy link

Description

I am having a problem where tooltip.show() doesn't always show the tooltip although the proper data is passed per the documentation. Additionally when a user zooms in on the chart the correct tooltip is never shown.

The chart I have made is a connected scatter plot made out of lines that have a start and end x point which have the same y value.

Steps to check or reproduce

https://jsfiddle.net/j7q8hwfg/
This jsfiddle contains the code to reproduce

I have made a custom plugin that makes additional 'path' elements for each 'path' in order to create an outline for each line to make the chart look better when the lines are close or overlapping.
The plugin also adds a 'mouseover' listener to the parent of each line to programmatically show the tooltip for the corresponding line.
Although I appear to pass the correct data in the tooltip.show function the tooltip doesnt show for every point. See first video

Screen.Recording.2023-04-18.at.2.53.48.PM.mov

Additionally when I zoom in on the chart the tooltip almost never shows but when it does it is an entirely different tooltip than what is desired. See second video

Screen.Recording.2023-04-18.at.2.55.36.PM.mov
@netil
Copy link
Member

netil commented May 3, 2023

Hi @Patrick-Keenan, thanks for the report.

Found 2 issues, which one is from your generation option, where point.sensitivity=1 makes harder to trigger  event for .tooltip.show()

And the other is a bug, where when xs option is used, not reflecting zoom state.

You can check the working example from below screenshot. The only changes was setting point.sensitivity=2 and fixing the second bug to reflect zoomed state.

netil pushed a commit to netil/billboard.js that referenced this issue May 3, 2023
When x axis is multipleXS type and has zoom scale, use
corresponding scale.

Ref naver#3187
@netil netil closed this as completed in cf82289 May 3, 2023
github-actions bot pushed a commit that referenced this issue May 4, 2023
## [3.8.1](3.8.0...3.8.1) (2023-05-04)

### Bug Fixes

* **api:** fix tooltip work for .load() with xs key ([13b9da7](13b9da7)), closes [#3194](#3194)
* **api:** Fix tooltip.show() to work zoomed with xs option ([cf82289](cf82289)), closes [#3187](#3187)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants