Skip to content

Conversation

emilykl
Copy link
Contributor

@emilykl emilykl commented Oct 7, 2025

Closes #7559

Fixes issue where setting layout.legend3.visible to false caused both legend and legend3 to disappear.

Also adds a Jasmine test to prevent regression.

It seems this bug was because legend._id was not being added to the processed legend object during the defaults step if visible was false. This DID cause the legend not to be drawn (desirable), but it had the side effect of causing the plot step to "assume" the legend _id to be legend if not available, which caused the visibility setting to also be applied to the first legend (undesirable).

Note that the only actual logic change is on line 242 of src/components/legend/defaults.js; the other changes in that file are just auto-formatting changes.

To test

@emilykl emilykl requested a review from camdecoster October 7, 2025 22:56
@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken labels Oct 9, 2025
@emilykl emilykl merged commit 361d8b5 into master Oct 9, 2025
6 checks passed
@emilykl emilykl deleted the fix-7559-legend-visible branch October 9, 2025 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: legend3.visible = false affects visibility of other legend
3 participants