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

Scatter trace hover appears at incorrect x value #912

Closed
csyrs opened this issue Sep 7, 2016 · 3 comments
Closed

Scatter trace hover appears at incorrect x value #912

csyrs opened this issue Sep 7, 2016 · 3 comments
Labels
bug something broken

Comments

@csyrs
Copy link

csyrs commented Sep 7, 2016

Example: http://codepen.io/anon/pen/WGvjGX?editors=1111

Mouse over the graph and observe that the hover position does not correspond to the x value logged in the console (and not just as a result of rounding). The console value is from the plotly_hover event and seems to more faithfully represent the actual mouse position.

In contrast, switching to a bar trace seems to align the hovers with the plotly_hover values.

@etpinard
Copy link
Contributor

etpinard commented Sep 7, 2016

most likely related to #803 and #780

@etpinard etpinard added the bug something broken label Sep 7, 2016
@fhurta
Copy link
Contributor

fhurta commented Sep 8, 2016

Although haven't found that documented, my understanding was that data.xvals refer to cursor position while data.points to the corresponding trace's points. See the updated pen

@alexcjohnson
Copy link
Collaborator

(cleaning up old bugs)

@fhurta is correct here - data.xvals is the cursor position (on whatever x axes exist on this subplot) whereas data.points shows the point(s) we found in data traces to hover on. I don't think there's a bug here.

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

No branches or pull requests

4 participants