-
-
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
Hovertemplate display of X value of points in hoverset that differ from that of the winning point #5555
Comments
Let's call it |
even when the X values match, if their |
It appears that there would be cases that the |
I believe there is some small tolerance even for non-period-positioned traces to contribute points to the hoverset in hovermode=x even when the x values don't exactly match, no? |
@archmoj it would be really great to get this one done this week if possible. |
@nicolaskruchten now using plotly.js/src/components/fx/hover.js Line 1286 in f83a962
Isn't that something we want to change in v2? e.g. can't we provide differing x inside parentheses after y or something? |
I'm not sure I understand what you're asking here... can you clarify please? |
Nevermind, actually it's not that line that adds differing positions :) |
OK. I commented the On another note right now with |
The use case is when you have, say, quarterly bars and monthly scatters AND you're using hovertemplate and unified hover. Right now when you hover on a scatter point, you don't get the indication about the X-coordinate of the bar. If you don't use hovertemplate you do, so we need to add this capability to hovertemplate. I think that using |
Basically the use case is this: https://codepen.io/nicolaskruchten/pen/MWpEQqZ?editors=0010 ... on line 15 we want to be able to add |
Right now, in compare and unified hover modes, it's possible for points to be in the hover set and still have slightly different X values from that of the point that won the hover, and in this case we show the differing X value in parentheses in the hoverlabel.
We need to be able to show this value when
hovertemplate
is active as well, possibly via some new hovertemplate %{value} that is empty if the X value matches that of the winning point, and contains "(%{x})" otherwise.This should honor the new
(x|y)hoverformat
attributes too.The text was updated successfully, but these errors were encountered: