What's Changed
A special release: Containing a new chart type - SunburstChart by @csdiehl. Some behaviour might not yet align with the rest of the recharts components and API, we will improve it as (and if) issues come up. Thank you!
Secondly, I want to call out the work that @PavelVanecek is doing. We are slowly moving forward to improve our state management, using react context, and moving away from cloning components. While there still is a long way to go, I can not stress enough how important this refactoring is, both to the maintainability and extensibility of recharts. Great work!
Finally, we are continuously extending the Tooltip and enabling to control the Tooltip from the outside. With the work of @julianna-langston, we can now set the index for which to show a Tooltip. Further, we can now show the Tooltip for hidden elements.
Features
- Sunburst chart by @csdiehl in #4037
- Enable developers to specify tooltip position before users interact by @julianna-langston in #4070
- Tooltip: Enable showing hidden graphicalItems in Tooltip by @nikolasrieble in #4083
Fix
- Fix tooltip rendering crash when activeItem is undefined by @tran-simon in #3982
- fix: type check by @HHongSeungWoo in #3992
- fix: dataEndIndex can be -1 by @HHongSeungWoo in #3988
- 2 a11y violations for fixed by @enriquetamames-cpi in #3950
- fix: label list offset prop by @ckifer in #3999
- Set More "key" property values by @imagineLife in #4001
- fix: ref of the responsive container by @HHongSeungWoo in #4008
- Pie payload types by @PavelVanecek in #4030
- allow className to be passed to Radial Bar background by @ckifer in #4027
- Fix: allow Brush to be controlled with start and end index by @ckifer in #4034
- feat: Add the dataKey type to legend props by @HHongSeungWoo in #4035
- fix: cursor key throwing non-unique key error by @ckifer in #4041
- Fix default parameters for setDetails() by @dahlie in #4079
- fix: Errorbar breaking at category XAxis type! by @AnujSharma141 in #4042
- fix: Radar dot events not working! by @AnujSharma141 in #4056
- Fix labels on XAxis by @PavelVanecek in #4059
- Fix yAxis labels by @PavelVanecek in #4064
- Adding className by @Nikhilh26 in #4069
Chore
- Remove @types/jest dependency by @PavelVanecek in #3995
- Test funnel utils by @imagineLife in #3977
- Add lint-test script by @PavelVanecek in #3996
- Chore: Remove a few instances of "no array index key" eslint comment by @imagineLife in #3997
- chore: fix pie sector key value by @imagineLife in #4005
- Chore: Update keys (stop "new bugs") by @imagineLife in #4006
- chore(deps-dev): bump @adobe/css-tools from 4.3.1 to 4.3.2 by @dependabot in #4007
- Separate cursor component by @PavelVanecek in #3994
- chore(deps-dev): bump vite from 4.4.11 to 4.5.1 by @dependabot in #4012
- Chore: adjust pie sector key value by @imagineLife in #4009
- Lint test fixes by @PavelVanecek in #4029
- Referenceline get end points tests by @PavelVanecek in #4031
- chore(deps-dev): bump follow-redirects from 1.15.2 to 1.15.4 by @dependabot in #4045
- ReferenceLine reads inputs from context instead of props by @PavelVanecek in #4033
- Chartlayoutcontext split by @PavelVanecek in #4054
- YAxis reads context instead of cloning by @PavelVanecek in #4062
- chore(deps-dev): bump vite from 4.5.1 to 4.5.2 by @dependabot in #4066
- CartesianGrid now has tests, and is split in smaller components by @PavelVanecek in #4067
- CartesianGrid uses default props instead of generateCategoricalChart injection, also a functional component now by @PavelVanecek in #4074
- Add axe scanning tests for chart types and common components by @julianna-langston in #4073
- CartesianGrid reads chartWidth and chartHeight from context by @PavelVanecek in #4075
- chore: set includeEvent property in filterProps as required! by @AnujSharma141 in #4065
- Make JSDoc types optional by @PavelVanecek in #4085
- CartesianGrid reads offset from context instead of props by @PavelVanecek in #4084
Storybook
- Update Storybook story for Pie Chart with Needle example to accommodate resizable charts by @hkmarques in #4002
- Custom Storybook theme for Recharts brand by @csdiehl in #4016
- docs: add controlled brush storybook entry by @ckifer in #4032
- Storybook: Added Legend component story! by @AnujSharma141 in #4039
- Storybook: Added Sector component story! by @AnujSharma141 in #4047
- Story: Adding PolarRadiusAxis story by @Shrenika123 in #4081
- Update mock data labels by @PavelVanecek in #4061
New Contributors
- @tran-simon made their first contribution in #3982
- @enriquetamames-cpi made their first contribution in #3950
- @hkmarques made their first contribution in #4002
- @csdiehl made their first contribution in #4016
- @AnujSharma141 made their first contribution in #4039
- @Nikhilh26 made their first contribution in #4069
- @dahlie made their first contribution in #4079
- @Shrenika123 made their first contribution in #4081
Full Changelog: v2.10...v2.11