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

Use hoverdistance with hovermode closest #3569

Closed
mmustala opened this issue Feb 22, 2019 · 4 comments
Closed

Use hoverdistance with hovermode closest #3569

mmustala opened this issue Feb 22, 2019 · 4 comments

Comments

@mmustala
Copy link

Hi.

My chart shows a lot of scatter lines and using the default hovermode became very verbose. Changing to hovermode 'closest' helped with it a lot. But now it is rather difficulty to hit some data points (candlesticks next to a scatter point especially) to see the hover box. I tried to set hoverdistance to 100 but it doesn't seem to have effect with this hovermode. But it would be really nice if it would show all hover items within the range defined with hoverdistance. But maybe just one item per data set, the one that is closest in the x axis.

Another way to reach this would be to have separate setting for x and y hoverdistance. Then I could use the default hovermode but define y hoverdistance to something like 10. Then it would show the hover items that are within the rectangle defined by the x and y hoverdistances.

@etpinard
Copy link
Contributor

Thanks for writing in.

Could you share a reproducible (ideally in a codepen) of the situation you're describing? hoverdistance appears to be working ok on graphs with hovermode: 'closest', example:

https://codepen.io/etpinard/pen/modbWY

@mmustala
Copy link
Author

mmustala commented Mar 4, 2019

What I meant is that it would show all points that are within the hoverdistance. The code in this pen demonstrates that it shows only one point even though two points from different data sets are within the range.

https://codepen.io/anon/pen/qvNobN

I think this kind of feature would require a new hovermode. Maybe in-range?

@etpinard
Copy link
Contributor

etpinard commented Mar 4, 2019

Related: #720

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants