Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Enable multiple inactive Legend items #897

Open
goleary opened this issue Jan 8, 2024 · 0 comments
Open

[Feature]: Enable multiple inactive Legend items #897

goleary opened this issue Jan 8, 2024 · 0 comments
Labels
Type: Feature New feature for existing component

Comments

@goleary
Copy link

goleary commented Jan 8, 2024

What problem does this feature solve?

I want a legend where my users can click on an item to remove it from a chart. Doing show should gray out just this legend item. The Legend component seems to only support either all categories as being active or a single one as being active. I'd like to be able to pass a list of what categories are active.

I'm happy to control the logic for which categories are active as well as remove from the set of categories passed to my chart, but currently there is no way to mark a single category as inactive in the legend.

What does the proposed API look like?

I should be able to pass another prop. Either inactiveCategories or activeCategories. activeLegend would no longer be necessary with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature for existing component
Projects
None yet
Development

No branches or pull requests

2 participants