Repository navigation
Fixup hover filters - #5668
Fixup hover filters#5668
Conversation
|
https://observablehq.com/@nicolaskruchten/plotly-js-branch-tip-chooser on this current branch. Start with your mouse on the far right and very slowly scan it towards the left. There is a very narrow zone between the two right-most markers where this happens. |
Thanks. Fixed by 3b85534. |
|
@nicolaskruchten @alexcjohnson I fixed the issues we noticed today and updated the codepens. |
|
Wow, this looks pretty great, behaviour-wise, thanks! Nice bug-fixing too 👍 |
|
The situation I'm describing in the above two comments violates the second rule in #5554:
Note that that rule references "the point that wins the hover" and says nothing about where the cursor is. |
After trying out a number of potential fixes towards enforcing that rule, and after looking at |
|
@archmoj please expand on why you think this needs relaxing? |
The point at 1.49 wins by hovering at 1.75. There is no harm to display bar at position 2 which is the closest bar. If we instead pick bar at position 1, it would be misleading. Please note that the unified hover is attached to cursor as well. |
|
Thanks for the explanation. I still think the invariant as described is the right one but I'll think about it a bit more over the weekend. It's too hard to reason about things if the hover set depends on the cursor position and the winning point IMO. My next question is how comes a scatter point at 1.49 wins with the cursor at 1.75 if there is a bar at 2? My instinct is to stick with the invariant as described and dig into the winning point logic after 2.0. |
Yeah. Let's think about it during weekend. |
OK. I made the adjustment to respect the rule. It doesn't look bad :) |
alexcjohnson
left a comment
There was a problem hiding this comment.
Looks perfect now! 💃




Fixes bug mentioned in #5554 (comment),
also simplifies
periodandnon-periodhovers in respect to #5553 and #5554.Also closes #5572 : Demo Before vs After.
And closes #4787 : Demo Before vs After
@plotly/plotly_js