fix: Pick the trace drawn last on a hover tie in scattergl and splom - #8079
Open
camdecoster wants to merge 5 commits into
Open
camdecoster wants to merge 5 commits into
camdecoster wants to merge 5 commits into
Conversation
camdecoster
marked this pull request as ready for review
September 25, 2026 17:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates
scattergl,splomlogic to matchscatterwhen a distance tie occurs during hover over a point.Closes #8077.
Changes
scatter,splomhover checkTesting
Notes
scattervsscatterglscatterconsiders the size of the marker when determining the tie break butscatterglandsplomdon'tscatter, a marker that's beneath another but has a smaller radius can win the tie break. This is intentional so that users can still get feedback on the smaller marker when it's covered up. Try running this snippet to see what I'm talking about:scatterglandsplomdon't consider the radius. I deemed that to be out of scope for this PR, so I'll add a follow up issue to take care of it later.scatterglhover logic whenhovermodeis something other than"x". In fix for ScatterGL hover and click events give the 'top' point instead of the 'bottom' point #3924, the loop was changed to run backward so that the highest index (the first) would win in the tie break. Due to the logic change, that no longer happened and tests started failing. Making the loop run forward fixes the issue while also maintaining the previous behavior.