-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Spike line on the wrong subplot on multi-subplot Fx.hover calls #3219
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
Comments
Edit: Try this workaround:
This does not work properly when multiple traces share one of the stacked yaxes - it will always choose the first trace on that axis. In order to work around this, we need to find the point nearest the values given to us. Since codepen requires captcha spyware I cannot create an account, so here is the above code, modified with the workaround:
I'll leave my original comment in place, since the more I look into this, the more problems with hover() I seem to find XD Original comment follows: This also effects hover labels in 'closest' mode. I wanted to make a contribution to fix this but it seems that it runs pretty deep, and that multiple subplots which are not overlaid are not really part of the original design. Perhaps this could be fixed by shifting the x|yval values, according to the axes' _offset values, when multiple subplots are specified? I imagine that should still work as intended when using 'x' or 'y' hovermodes, and 'closest' would now work as intended... but it might break 'compare' (?) and I can see numerous places where this could be done anyway. Given that this is nontrivial and has been sitting here for a year, and I've read that Fx.hover might just go away in v2 (what's v2? lol) I wonder if it's even worth investing my time? I've already spent a day or so on it and have learned enough to know it's not straightforward and I think I know why it's been sitting here for so long ;) |
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 |
Deploy #301 on subplots can display all the point info when hover on any subplot. But if the trace data of two subplots are close, the spike line may be in the wrong subplot.
https://codepen.io/anon/pen/vQOrMj
Put cursor on (19, 119) point of trace0, the spike line of yaxis is in the trace1 plot.
The text was updated successfully, but these errors were encountered: