-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
(feat)Line: add support for hiding line charts by default #2540
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit b9ae884:
|
Wow galing |
Thank you for this @clcatalan! Could you please add tests for this new feature? |
hi @plouc added unit tests, all Line unit tests still pass as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Solves issue for: #2481
Solution is for user to simply pass an array of keys in the initialHiddenIds props for the Line Chart. This toggles the legend to "off" by default. The app consuming nivo should do the computation to determine if a key should be hidden or not.
*this is what it looks like on load, the cognac line is hidden by default