Releases: recharts/recharts
v2.12.0
What's Changed
Bug fixes and a few small new features.
Releasing 2.12.0 to create a "clean slate" as contributors are discussing next moves for recharts.
We will try to focus on upgrades, architectural changes, and long-pending breaking changes so we can release a recharts v3. This will not be a large major version, or one hard to upgrade to, but rather a major version bump to prevent us from breaking people with library upgrades, large refactors, etc. Feature parity should hold. Thanks!
Features
Bar
: Accept a callback function forminPointSize
so it can be determined by data by @ckifer in #4099 closes #2819Accessibility
: Enable screen reader support with accessibilityLayer and default tooltip by @julianna-langston in #4077
Fix
Bar
:activeBar
should not be true by default, fixes a breaking change from 2.9.0 by @ckifer in #4139 - fixes #4103 and #4101Scatter
: fix non-unique key errors by @imagineLife in #4087 - fixes #4151 and #4060Pie
: fix non-unique key errors by @imagineLife in #4106Tooltip
: fix bug that caused throttled tooltip to stay active when moving mouse quickly by @HHongSeungWoo in #4100 fixes #4093
Chore
- Cleanup, tests, and refactoring work. Thanks @PavelVanecek
- Upgrade react smooth, remove
translateStyle
, remove prop-types as a peerDep- NOTE: animations will no longer have browser prefixes on them. Browsers have good support for this (https://caniuse.com/?search=transforms)
- Upgrade dev dependencies
- Upgrade TypeScript to 4.9.5 (no definition changes from upgrade)
Storybook
- New storybook stories and doc updates
New Contributors
- @TRFielder made their first contribution in #4088
Full Changelog: v2.11...v2.12.0
v2.11.0
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.
POTENTIALLY BREAKING CHANGE: this release adds the use of the React context API which was not released until React 16.8. This means that 2.11 effectively drops support for React <16.8 unintentionally. Please report any breaking changes by making an issue.
Features
Sunburst
: new chart type by @csdiehl in #4037Accessibility
: Enable developers to specify tooltip position before users interact by @julianna-langston in #4070Tooltip
: Enable showing hidden graphicalItems in Tooltip by @nikolasrieble in #4083
Fix
ErrorBar
: will now throw an invariant if X direction is used without typenumber
on axis by @AnujSharma141 in #4042Radar
: allow events to be passed successfully to the Radar dot by @AnujSharma141 in #4056TypeScript / Tooltip
:Payload
type now correctly includesclassName
by @Nikhilh26 in #4069Accessibility
: fix bug causingaccessibilityLayer
to break keyboard nav by @dahlie in #4079
Chore
- Lots of cleanup and refactoring work. We've introduced the use of context throughout Recharts refactoring and so far so good!
Storybook
- New storybook stories and additional examples
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
v2.10.4
What's Changed
Fix some older bugs annoying bugs, TS typings, update to the storybook theme, and more
Fix
ResponsiveContainer
: fixref.current.current
without breaking users using current implementation by @HHongSeungWoo in #4008 - closes #3718Brush
: Allow Brush to be controlled with start and end index via state by @ckifer in #4034 - closes #2404Legend
: TypeScript - Add the dataKey type to legend props by @HHongSeungWoo in #4035 - closes #2909Pie
: TypeScript - addedpayload
toPieSectorDataItem
type by @PavelVanecek in #4030Pie
: unique sector keys fix by @imagineLife in #4009 closes #3273RadialBar
: allow className to be passed to Radial Bar background by @ckifer in #4027 - closes #4011
Storybook
- Storybook: Added Legend component story! by @AnujSharma141 in #4039
- Storybook: add controlled brush storybook entry by @ckifer in #4032
- Storybook: Custom Storybook theme for Recharts brand by @csdiehl in #4016
New Contributors
- @csdiehl made their first contribution in #4016
- @AnujSharma141 made their first contribution in #4039
Full Changelog: v2.10.3...v2.10.4
v2.10.3
What's Changed
- Fix non-unique react
key
bug(s) by @imagineLife in #4006 - closes #4004
New Contributors
- @hkmarques made their first contribution in #4002
Full Changelog: v2.10.2...v2.10.3
v2.10.2
What's Changed
Patch some bugs from 2.9 / 2.10
Fix
Tooltip
: Fix tooltip rendering crash when activeItem is undefined by @tran-simon in #3982Cursor
: should no longer show gray background on hover where there was none previously @HHongSeungWoo in #3992Tooltip
: show tooltip whendata
prop is on individual cartesian component by @HHongSeungWoo in #3988LabelList
- TypeScript: LabelList offset prop issue by @ckifer in #3999
Accessibility
Brush
: set default aria-label and allow value override by @enriquetamames-cpi in #3950
Refactor / Cleanup
- Removing some eslint errors for "no array index key" by @imagineLife
New Contributors
- @tran-simon made their first contribution in #3982
- @enriquetamames-cpi made their first contribution in #3950
Full Changelog: v2.10.1...v2.10.2
Patch: Do not include types from test folder
Fixes #3978
Full Changelog: v2.10...v2.10.1
v2.10
What's Changed
Highlights
Both @HHongSeungWoo and @bernardobelchior landed improvements to performance!
- Perf: rendering improvement by @HHongSeungWoo in #3914
- Reduce calls to
getStringSize
when calculating visible ticks (#2589) by @bernardobelchior in #3953
We have made progress on our preparation of the 3.0 version by migrating from jest to vite. For details and motivation, please read the issue linked to the PR. Special thanks to @branberry for pushing on vitest! Thank you.
- Testing: Migrate from jest to vitest by @nikolasrieble in #3890
Fix
- fix(RadarChart): angleAxis type='number' dose not render correctly by @HHongSeungWoo in #3960
- Fix: Respect the user configuration of Tootip - active by @nikolasrieble in #3935
- fix(tooltip): incorrect array slicing by @HHongSeungWoo in #3972
- fix: #3073 by @HHongSeungWoo in #3862
- Fix #2589 by @HHongSeungWoo in #3893
- Fix #2862 by @HHongSeungWoo in #3892
- fix(vitest-snapshots): regen incorrect vitest snaps by @ckifer in #3903
- Fix #172 by @HHongSeungWoo in #3908
- Fix overwritten props for accessibilityLayer by @mrskiro in #3920
- Add
dataKey
prop onCategoricalChartProps
by @charpeni in #3870 - Added scroll offset positions to spoof calculations to fix accessibility issue by @gouravnema in #3879
- Change in the value of CategoricalChartFunc by @HHongSeungWoo in #3894
- Fix ResponsiveContainer by @HHongSeungWoo in #3921
- fix(tooltip): add updateBBox on componentDidMount by @HHongSeungWoo in #3924
- fix: missing index on LabelProps type by @ckifer in #3939
- fix: Line never checks for new totalLength on component update by @ckifer in #3946
- fix(tooltip): Coordinate prop of Tooltip can be null by @HHongSeungWoo in #3948
- Fixed the initial mount re-rendering bug in ResponsiveContainer by @HHongSeungWoo in #3918
- fix(tooltip): getTooltipContent should avoid undefined by @HHongSeungWoo in #3957
- fix: don't allow negative height and width values by @ckifer in #3963
Chore
- Lodash: Import only specific functions by @nikolasrieble in #3902
- _.isArray: Replace with Array.isArray by @nikolasrieble in #3864
- Remove unit test that was comparing new/old reduce-css-calc by @PavelVanecek in #3868
- chore(deps-dev): bump @babel/traverse from 7.22.11 to 7.23.2 by @dependabot in #3869
- Update Typescript version by @HHongSeungWoo in #3881
- Remove duplicate types In Area chart by @HHongSeungWoo in #3882
- Tooltip translate tests by @PavelVanecek in #3872
- Cleanup babel by @HHongSeungWoo in #3905
- Remove unused babel plugin in the demo by @HHongSeungWoo in #3909
- Replace classnames by @HHongSeungWoo in #3910
- Move function getUniqPayload to separate file, add tests by @PavelVanecek in #3878
- Refactoring mouse event by @HHongSeungWoo in #3891
- Refactoring ResponsiveContainer by @HHongSeungWoo in #3885
- Reuse assertNotNull in AccessibilityLayer.spec.tsx by @PavelVanecek in #3916
- Split Tooltip into TooltipBoundingBox by @PavelVanecek in #3951
- Chore: test Global util + include coverage in test command by @imagineLife in #3974
Storybook
- LineChartStories: Replace random data with default pageData by @nikolasrieble in #3860
- Customized stories - 3740 by @Shashangbhagat in #3863
- Add AccessibilityLater button story with a button by @PavelVanecek in #3917
- Storybook: Fix Pie API story by @nikolasrieble in #3943
- Storybook: Fix Pie.mdx by @nikolasrieble in #3944
- Storybook: Cleanup and simplify Tooltip stories by @nikolasrieble in #3952
- Add synchronised tooltip story by @PavelVanecek in #3964
Feat
- feat: Funnel support custom shape prop by @andrewangelle in #3886
New Contributors
- @charpeni made their first contribution in #3870
- @gouravnema made their first contribution in #3879
- @mrskiro made their first contribution in #3920
- @imagineLife made their first contribution in #3974
Full Changelog: v2.9.0...v2.10
v2.9.3
v2.9.2
v2.9.1
Bug fixes following 2.9.0
Fix
TypeScript
: fix breaking change inActiveShape
types - fixes #3911 - thanks @andrewangelleCartesianGrid
: fix breaking change where you could no longer renderCartesianGrid
without a y-axis - fixes #3907 - thanks @akamfoadLine
: fix infinite loop whenstrokeDasharray
is'0'
onLine
- fixes #3899 (and maybe others)
Full Changelog: v2.9.0...v2.9.1