-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Fixup hover on period positioned points #5618
Conversation
This does seem like an improvement, yes! |
If I give the scatter trace in your demo a period of its own, we again get multiple labels for that one trace. |
I think there's another invariant here that we could maybe implement fairly easily, which should be implicit but let's make explicit:
no? Seems like a straightforward filter operation? |
Yes, though there may be cases where we lose track of which is the "best" point by the time we're ready to do this filter. Fixes like this PR may be the best route in the short term, but I think all of this does point to a need eventually to take a step back and reconceptualize our hover/spike picking framework in order to satisfy the invariants @nicolaskruchten has stated, among others that are already assumed, at an architectural level rather than by layering on more tweaks. |
Good catch. Fixed by 543698a. |
Noting that some trace types produce multiple hover points; so we cannot perform that in general. |
@alexcjohnson can we please get this reviewed and landed, ideally this week? :) |
@alexcjohnson thanks very much for the review. |
Thanks for the dive-in Alex! I'll take a close look at them early next week but I don't think any of them break the invariants in #5553 which this PR is meant to enforce, so I think I agree with Mojtaba that if the implementation looks good we should merge this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me. Looks good! 💃
Closes #5553.
demo
TODOs:
@plotly/plotly_js