Skip to content

hoverinfo=none with hovermode=x unified #5516

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

Closed
alexcjohnson opened this issue Feb 22, 2021 · 1 comment · Fixed by #5854
Closed

hoverinfo=none with hovermode=x unified #5516

alexcjohnson opened this issue Feb 22, 2021 · 1 comment · Fixed by #5854
Labels
bug something broken

Comments

@alexcjohnson
Copy link
Collaborator

trace.hoverinfo has two special values: 'skip' blocks hover labels AND hover events, and 'none' blocks hover labels but still emits events (or includes this trace in events with multiple traces). For "compare mode" hovermode: 'x' this works correctly, but for unified mode hovermode: 'x unified' the trace symbols still appear, just with no text. This happens even if ALL the traces have hoverinfo: 'none', but if one trace has hoverinfo: 'skip' it seems that this trace gets filtered out of the unified hover label, and sometimes it takes away some of the hoverinfo: 'none' labels with it.

As saved, the following codepen has hoverinfo: 'none'/undefined/'none' (for the three traces in the first graph) and you see all three trace symbols but text only on the second. The correct behavior would be to only see the symbol and text for the second.

If you set all of them to 'none', you see three symbols and no text. The correct behavior would be no hover label at all.
If you set 'none'/'skip'/'none' you see the first and third symbols and no text. The correct behavior would be no hover label at all.
If you set 'skip'/undefined/'none' you see just the second symbol and its text. This is the correct behavior, strangely enough!
If you set 'skip/'none'/'none' you see the second and third symbols and no text. The correct behavior would be no hover label at all.

https://codepen.io/alexcjohnson/pen/mdOBjVz?editors=1010

Screen Shot 2021-02-22 at 10 23 58 AM

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

Successfully merging a pull request may close this issue.

2 participants