You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scatterplot hover text in unexpected position #322
[unexpected behavior]
In case there are several points with the same x coordinate, the hover text is placed at and refers to another point (sometimes the lowest, sometimes the highest, or the middle one). This also appears to happen even when the respective point is outside the currently shown region of the figure (i.e. the user has zoomed in).
For me, expected behavior is the hover text to be placed at the point under the mouse cursor.
To reproduce -- easily done in the example on the github front page (or any of the other interactive examples on the plot.ly site), zoom in until there's only one point shown, and hover over it.
Activity
cpsievert commentedon Dec 2, 2015
I think you want
layout(gg, hovermode = "closest")?pstoyanov commentedon Dec 2, 2015
Yes, you are absolutely correct. Thank you!
Maybe this should be the default for scatterplots?
cpsievert commentedon Dec 2, 2015
This is the default in plotlyjs and I think it's generally a good idea to keep consistency with defaults.