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

configurable hoverinfo-x placement #3145

Closed
mojoaxel opened this issue Oct 23, 2018 · 7 comments
Closed

configurable hoverinfo-x placement #3145

mojoaxel opened this issue Oct 23, 2018 · 7 comments
Labels
feature something new

Comments

@mojoaxel
Copy link
Contributor

It would be nice if it would be configurable if the x-value of the hoverinfo is shown as a seperated hover or as part of the data-hover.

current behavior

image

future behavior

image

@antoinerg antoinerg added the feature something new label Oct 24, 2018
@antoinerg
Copy link
Contributor

antoinerg commented Oct 24, 2018

Thank you @mojoaxel for your interest in plotly.js!

I completely agree this would be a useful improvement. This ties into issue #3007 which aim to provide total control over the content of hover labels.

This is still work in progress, but the following PR #3126 should allow you to get this behavior by specifying an hovertemplate.

@etpinard
Copy link
Contributor

@mojoaxel I think setting layout.hovermode: 'closest' will give you the desired result.

@mojoaxel
Copy link
Contributor Author

I think setting layout.hovermode: 'closest' will give you the desired result.

This did not solve the problem because then only the hove for the 'closest' trace is shown and no longer the hovers of nearby data-points:

image

I would still like to see nearby data-points. My point here is that I find it very unexpected, that the hover for x-values in displayed completely different to let's say y or the text values.
(btw: Why are y-values not also realized as a y-axis bound hover?).

I see potential here to make the general hover-behavior more consistent.

@etpinard
Copy link
Contributor

(btw: Why are y-values not also realized as a y-axis bound hover?).

Could you clarify what you mean here? A screenshot should suffice. Thanks!

@mojoaxel
Copy link
Contributor Author

mojoaxel commented Oct 30, 2018

Could you clarify what you mean here? A screenshot should suffice. Thanks!

image

To make this clear: This is not the behavior I need, it's just not very consistent.

@etpinard
Copy link
Contributor

Ok, and would you call the behavior with hovermode: 'y' consistent with hovermode: 'x' (the default):

https://codepen.io/etpinard/pen/bmyJQE ?

@gvwilson
Copy link
Contributor

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

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

4 participants