Small fixes while working on v3 continued...
What's Changed
Feat
BarChart
: support percentage (of chart) forbarSize
. Helps set size of bar when there are few datapoints Fixes #3640 by @graup in #4407
Fix
Address #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
: useSVGAttributes
instead ofSVGProps
in forwardRef components by @ckifer in #4413typescript - Pie
: fix Pieref
which was cast toHTMLElement
when theref
is actually referring toSVGGElement
. This gave false information to whoever is usingref
on thePie
component
Full Changelog: v2.12.4...v2.12.5