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
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]: legend3.visible = false affects visibility of other legend
1 participant