Description
This PR adds a feature from #876 for an optional legend to donut chart that's hidden by default, providing null to activeSector prop would show the legend with no default value and providing an index string from data would make the element active on page load
I added a new activeSector prop that receives undefined or null or string and it will make sector active upon page loading up and
Related issue(s)
What kind of change does this PR introduce? (check at least one)
[ ] Bug fix (non-breaking change which fixes an issue)
[X] New Feature (non-breaking change which adds functionality)
[ ] New Feature (BREAKING CHANGE which adds functionality)
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:
Does this PR introduce a breaking change? (check one)
[ ] Yes
[X] No
If yes, please describe the impact and migration path for existing applications:
How has this been tested?
Screenshots (if appropriate):
The PR fulfils these requirements:
[ ] It's submitted to the main branch
[ ] When resolving a specific issue, it's referenced in the related issue section above
[ ] My change requires a change to the documentation. (Managed by Tremor Team)
[ ] Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.
[ ] By contributing to Tremor, you confirm that you have read and agreed to Tremor's CONTRIBUTING.md guideline. You also agree that your contributions will be licensed under the Apache License 2.0 license.
Description This PR adds a feature from #876 for an optional legend to donut chart that's hidden by default, providing
null
toactiveSector
prop would show the legend with no default value and providing an index string from data would make the element active on page loadI added a new
activeSector
prop that receivesundefined
ornull
orstring
and it will make sector active upon page loading up andRelated issue(s)
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
How has this been tested?
Screenshots (if appropriate):
The PR fulfils these requirements:
main
branch