Skip to content

fix: Show only the hovered category in x/y hover labels on category axes - #7960

Open
my-tien wants to merge 5 commits into
plotly:mainfrom
my-tien:7152-hover-label
Open

my-tien wants to merge 5 commits into
plotly:mainfrom
my-tien:7152-hover-label

Conversation

@my-tien

@my-tien my-tien commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7152

Now data points within hoverdistance but outside the hovered category are omitted from the hover label if the hovermode is "x", "y", "x unified" or "y unified".
Within the category, the hoverdistance still filters away too distant data points.

…eighboring category)

Now, data points within hoverdistance but outside the hovered category are omitted from the hover label.
Within the category, the hoverdistance still filters away too distant data points.
@my-tien
my-tien marked this pull request as ready for review August 13, 2026 15:01
@camdecoster

Copy link
Copy Markdown
Contributor

Thanks for the fix! We'll review and follow up with you.

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change gets us part of the way to the fix. I left a comment about an issue I saw. Before moving forward, could you please merge main and address the conflict?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement, but I still see the same issue when hovering over the center or left side of the Other bar (from the issue figure). We need to add a filter looking at the category under the cursor before the spike line and winning point are chosen to handle that case. Could you please look into that? I have a solution that I've tested locally and I can push that if you'd like.

@camdecoster camdecoster changed the title Fix #7152: Hover label showing data points of other category than the hovered one fix: Show only the hovered category in x/y hover labels on category axes Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect hover label for missing last value with hovermode x-unified and tickson=boundaries

3 participants