FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Properly include shapes when toggling legend visibility by camdecoster · Pull Request #7813 · plotly/plotly.js · GitHub

fix: Properly include shapes when toggling legend visibility - #7813

Merged
camdecoster merged 5 commits into
masterfrom
cam/6771/fix-legendgroup-toggling-shapes
May 29, 2026
Merged

fix: Properly include shapes when toggling legend visibility#7813
camdecoster merged 5 commits into
masterfrom
cam/6771/fix-legendgroup-toggling-shapes

Conversation

camdecoster commented May 28, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Description

Include shapes with legendgroup specified when handling legend visibility toggling.

Closes #6771.

Changes

  • Update shape default coercion to properly set legend, legendgroup attributes
  • Update filtering for shapes when toggling legend visibility
  • Add test

Screenshots/Videos

Before:

Screencast.From.2026-05-28.17-12-40.mp4

After:

Screencast.From.2026-05-28.17-12-04.mp4

Notes

  • There were two bugs:
    • Shapes with a legendgroup and also showlegend as false were getting filtered out of the check for handling legend clicks to toggle visibility
    • Certain shape attributes were gated behind a check on showlegend, so those attributes weren't getting populated
  • This update matches the behavior of traces and legendgroup visibility toggling

camdecoster changed the title Add test fix: Properly include shapes when toggling legend visibility May 28, 2026
camdecoster marked this pull request as ready for review May 28, 2026 23:16
emilykl previously approved these changes May 29, 2026

emilykl 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM 🚀

emilykl commented May 29, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

hold up @camdecoster -- any chance the failing image test is related to these changes, since the failure is that some images are not showing up? Maybe shapes and images share some coercion logic.

edit: Never mind, unrelated

camdecoster merged commit dbefbad into master May 29, 2026
155 of 161 checks passed
camdecoster deleted the cam/6771/fix-legendgroup-toggling-shapes branch May 29, 2026 17:25

Copy link
Copy Markdown

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

legendgroup visibility toggling does not work for shapes when showlegend is false

3 participants


Back | FazBrowse Home | New Git URL