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

Smarter defaults for layout.hovermode #778

Closed
joshua-gould opened this issue Jul 26, 2016 · 6 comments
Closed

Smarter defaults for layout.hovermode #778

joshua-gould opened this issue Jul 26, 2016 · 6 comments
Labels
feature something new
Milestone

Comments

@joshua-gould
Copy link
Contributor

Please see http://codepen.io/anon/pen/akKOvE for an example.

@etpinard
Copy link
Contributor

Confirmed. Thanks.

@etpinard etpinard added the bug something broken label Jul 28, 2016
@etpinard
Copy link
Contributor

etpinard commented Feb 9, 2017

Looking at this issue again, I'm thinking this is the desired behavior under layout.hovermode: 'x' which is the default in your case because not all traces are horizontal (see logic here).

Setting layout.hovermode to either 'y' or 'closest' gives the desired behavior.

@alexcjohnson
Copy link
Collaborator

setting layout.hovermode to 'y' in this case mucks up hover for the rug trace, so that's not a good option. But I think what this points to is that "compare" mode is only a good default hover mode in certain (albeit very common) cases - where there are multiple traces of the same type with monotonic data mostly in common for the "compare" axis. What we should really do is default to 'closest' if any of those conditions is not met. That would help in even relatively simple cases like one or more scatter traces with nonmonotonic points (and perhaps we could even figure out if it's y that's monotonic instead of x and switch to hovermode: 'y'). Renaming this issue accordingly.

@alexcjohnson alexcjohnson changed the title Boxplot hover text statistics not shown when additional traces are added to plot Smarter defaults for layout.hovermode Aug 15, 2017
@etpinard
Copy link
Contributor

Adding this to the v2 milestone

@archmoj
Copy link
Contributor

archmoj commented May 20, 2021

We could possibly close this now that hovermode is going to default to closest in v2. Right?

@nicolaskruchten
Copy link
Contributor

Yes.

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

No branches or pull requests

5 participants