Redefined chart library built with React and D3
Tooltip
: fix glitch where Tooltip always rendered in the top left even if animation was disabled by @HHongSeungWoo in https://github.com/recharts/recharts/pull/4425 fixes https://github.com/recharts/recharts/issues/4424
CI/Build fix
: Added proper .js
suffixes to main module and jsnext:main paths in package.json by @dobosalparbc in https://github.com/recharts/recharts/pull/4431 fixes https://github.com/recharts/recharts/issues/2858
Full Changelog: https://github.com/recharts/recharts/compare/v2.12.5...v2.12.6
Small fixes while working on v3 continued...
BarChart
: support percentage (of chart) for barSize
. Helps set size of bar when there are few datapoints Fixes #3640 by @graup in https://github.com/recharts/recharts/pull/4407
Address https://github.com/recharts/recharts/issues/4382
A recent release of @types/react
broke some builds because they removed certain (unused) events from common event handler attributes. recharts
was unknowingly enumerating keys of SVGProps
in the Layer
component with the old types and causing a type error on tsc
with skipLibCheck: false
typescript - Layer
: use SVGAttributes
instead of SVGProps
in forwardRef components by @ckifer in https://github.com/recharts/recharts/pull/4413
typescript - Pie
: fix Pie ref
which was cast to HTMLElement
when the ref
is actually referring to SVGGElement
. This gave false information to whoever is using ref
on the Pie
componentFull Changelog: https://github.com/recharts/recharts/compare/v2.12.4...v2.12.5
Small fixes while working on v3 continued...
Accessibility
: remove role attribute from recharts-wrapper which caused an accessibility violation with > 1 chart on the same page by @julianna-langston in https://github.com/recharts/recharts/pull/4386, fixes #4384X/YAxis
: fix incorrect padding calculation when there is 1 datapoint or less by @graup in https://github.com/recharts/recharts/pull/4314 closes #4313className
fixes - helps slowly address https://github.com/recharts/recharts/issues/2169:
Tooltip
: allow custom className
on cursor
by @108yen in https://github.com/recharts/recharts/pull/4306
RadarChart/RadialBarChart
: allow custom className
on PolarRadiusAxis
, PolarAngleAxis
, and Radar
dot by @108yen in https://github.com/recharts/recharts/pull/4335
Pie
: allow custom className
on label
and labelLine
of Pie
by @108yen in https://github.com/recharts/recharts/pull/4381
Full Changelog: https://github.com/recharts/recharts/compare/v2.12.3...v2.12.4
Some more small changes/fixes while working on 3.x
Legend
: fix issue where Legend was not taken into account when scaling the chart container by @zhonglin94 in https://github.com/recharts/recharts/pull/4272 closes https://github.com/recharts/recharts/issues/4246
Area
: fixed a bug where className was not assigned to areaDot by @108yen in https://github.com/recharts/recharts/pull/4294 closes https://github.com/recharts/recharts/issues/4290
RadialBar
: address regression where radial bar and its background were off from eachother because of rounding by @ckifer in https://github.com/recharts/recharts/pull/4295 closes https://github.com/recharts/recharts/issues/4264
ErrorBar
: do not count null
as 0 in error bar domain by @rinkstiekema in https://github.com/recharts/recharts/pull/4297
Full Changelog: https://github.com/recharts/recharts/compare/v2.12.2...v2.12.3
Some more small fixes while working on 3.x
Pie
: pie label keys are not unique when data is 0 by @ckifer in https://github.com/recharts/recharts/pull/4224
ResponsiveContainer
: Remove incorrectly timed console.warn call, only log when using soon-to-be deprecated feature by @HHongSeungWoo in https://github.com/recharts/recharts/pull/4249
Full Changelog: https://github.com/recharts/recharts/compare/v2.12.1...v2.12.2
Unintentional regression broke panoramic/compact Brush in 2.11.0 and 2.12.0, backport the fix to 2.x as we work on 3.x
Full Changelog: https://github.com/recharts/recharts/compare/v2.12.0...v2.12.1
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!
Bar
: Accept a callback function for minPointSize
so it can be determined by data by @ckifer in https://github.com/recharts/recharts/pull/4099 closes https://github.com/recharts/recharts/issues/2819
Accessibility
: Enable screen reader support with accessibilityLayer and default tooltip by @julianna-langston in https://github.com/recharts/recharts/pull/4077
Bar
: activeBar
should not be true by default, fixes a breaking change from 2.9.0 by @ckifer in https://github.com/recharts/recharts/pull/4139 - fixes https://github.com/recharts/recharts/issues/4103 and https://github.com/recharts/recharts/issues/4101
Scatter
: fix non-unique key errors by @imagineLife in https://github.com/recharts/recharts/pull/4087 - fixes https://github.com/recharts/recharts/issues/4151 and https://github.com/recharts/recharts/issues/4060
Pie
: fix non-unique key errors by @imagineLife in https://github.com/recharts/recharts/pull/4106
Tooltip
: fix bug that caused throttled tooltip to stay active when moving mouse quickly by @HHongSeungWoo in https://github.com/recharts/recharts/pull/4100 fixes https://github.com/recharts/recharts/issues/4093
translateStyle
, remove prop-types as a peerDep
Full Changelog: https://github.com/recharts/recharts/compare/v2.11...v2.12.0
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.
Sunburst
: new chart type by @csdiehl in https://github.com/recharts/recharts/pull/4037
Accessibility
: Enable developers to specify tooltip position before users interact by @julianna-langston in https://github.com/recharts/recharts/pull/4070
Tooltip
: Enable showing hidden graphicalItems in Tooltip by @nikolasrieble in https://github.com/recharts/recharts/pull/4083
ErrorBar
: will now throw an invariant if X direction is used without type number
on axis by @AnujSharma141 in https://github.com/recharts/recharts/pull/4042
Radar
: allow events to be passed successfully to the Radar dot by @AnujSharma141 in https://github.com/recharts/recharts/pull/4056
TypeScript / Tooltip
: Payload
type now correctly includes className
by @Nikhilh26 in https://github.com/recharts/recharts/pull/4069
Accessibility
: fix bug causing accessibilityLayer
to break keyboard nav by @dahlie in https://github.com/recharts/recharts/pull/4079
Full Changelog: https://github.com/recharts/recharts/compare/v2.10...v2.11
Fix some older bugs annoying bugs, TS typings, update to the storybook theme, and more
ResponsiveContainer
: fix ref.current.current
without breaking users using current implementation by @HHongSeungWoo in https://github.com/recharts/recharts/pull/4008 - closes https://github.com/recharts/recharts/issues/3718
Brush
: Allow Brush to be controlled with start and end index via state by @ckifer in https://github.com/recharts/recharts/pull/4034 - closes https://github.com/recharts/recharts/issues/2404
Legend
: TypeScript - Add the dataKey type to legend props by @HHongSeungWoo in https://github.com/recharts/recharts/pull/4035 - closes https://github.com/recharts/recharts/issues/2909
Pie
: TypeScript - added payload
to PieSectorDataItem
type by @PavelVanecek in https://github.com/recharts/recharts/pull/4030
Pie
: unique sector keys fix by @imagineLife in https://github.com/recharts/recharts/pull/4009 closes https://github.com/recharts/recharts/issues/3273
RadialBar
: allow className to be passed to Radial Bar background by @ckifer in https://github.com/recharts/recharts/pull/4027 - closes https://github.com/recharts/recharts/issues/4011
Full Changelog: https://github.com/recharts/recharts/compare/v2.10.3...v2.10.4
key
bug(s) by @imagineLife in https://github.com/recharts/recharts/pull/4006 - closes https://github.com/recharts/recharts/issues/4004
Full Changelog: https://github.com/recharts/recharts/compare/v2.10.2...v2.10.3