Skip to content

recharts 2.12.5

Small fixes while working on v3 continued...

What's Changed

Feat

Fix

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 component

Full Changelog: https://github.com/recharts/recharts/compare/v2.12.4...v2.12.5