Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
scatter & bar hover fixes for #780 #2218
Scatter hover was too permissive and too flat in its distance function in compare mode - so it would call the wrong point "closest" sometimes. That was the main culprit in #780, we were matching a scatter point with one x value to a bar with a different x and concluding that they really shouldn't "compare" with each other, so tossing out the bar.
Bar hover was also too restrictive, it would not allow you to be hovered on a bar if the mouse was over the gap between bars. Now in compare mode it allows that, which makes for a more pleasant (and useful) effect as you mouse over, particularly when the bars are very narrow: the hover labels don't flash on/off anymore, there's always one showing.
For both trace types I left "closest" hover behavior as it was. In particular this means the "flashing" effect for bars is still there in this mode. Perhaps there would be a way to fix it at least for very thin bars, by rounding outward or something in our acceptance criteria, but at least this doesn't seem to lead to any explicit bugs.