Skip to content

Fix unified hover bar pattern swatch for per-point marker.pattern - #8039

Open
Dmao233 wants to merge 3 commits into
plotly:mainfrom
Dmao233:cursor/fix-8008-bar-pattern-unified-hover-f220
Open

Dmao233 wants to merge 3 commits into
plotly:mainfrom
Dmao233:cursor/fix-8008-bar-pattern-unified-hover-f220

Conversation

@Dmao233

@Dmao233 Dmao233 commented Sep 14, 2026

Copy link
Copy Markdown

Features, Bug fixes, and others

Fixes #8008.

Unified hover builds the bar swatch via the mock legend path. styleBarLike always read marker.pattern at index 0, so when shape / fgcolor are per-point arrays the tooltip swatch used the first bar's pattern and color.

When legend._inHover is set, use the hovered point index instead. Hover pattern defs get a separate id so they do not overwrite the real legend.

Adds a Jasmine regression covering per-point shape / fgcolor / fgopacity under unified hover. dist/ untouched.

Dmao233 and others added 3 commits September 14, 2026 01:29
Unified hover built the bar swatch from pattern index 0.
Use the hovered point index so color and pattern match that bar.

Co-authored-by: CenFangyu <Dmao233@users.noreply.github.com>
The fork pull request number is now known.

Co-authored-by: CenFangyu <Dmao233@users.noreply.github.com>
Co-authored-by: CenFangyu <Dmao233@users.noreply.github.com>
@camdecoster camdecoster self-assigned this Sep 14, 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.

[BUG]: shape.pattern for bar trace causes color and pattern to be applied to wrong traces in unified hover tooltip

2 participants