Skip to content

fix legend option types; accept style and className on scale options#2421

Open
Fil wants to merge 1 commit intomainfrom
fil/fix-legend-type-2
Open

fix legend option types; accept style and className on scale options#2421
Fil wants to merge 1 commit intomainfrom
fil/fix-legend-type-2

Conversation

@Fil
Copy link
Copy Markdown
Contributor

@Fil Fil commented Apr 13, 2026

Generic legend options (label, tickFormat, fontVariant, style, className) were only declared on LegendOptions, which extends ColorLegendOptions.

This meant passing style or className inside scale options was a type error.

Instead we introduce BaseLegendOptions and have each specific legend type extend it.

Fixes #2175
Supersedes #2175

Generic legend options (`label`, `tickFormat`, `fontVariant`, `style`, `className`) were only declared on LegendOptions, which extends ColorLegendOptions. This meant passing `style` or `className` inside scale options was a type error.

Instead we introduce `BaseLegendOptions` and have each specific legend type extend it.

Fixes #2175
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.

1 participant