npm / react-chartjs-2
react-chartjs-2
What changed in react-chartjs-2 4 to 5, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-30.
11 breaking1 new APIs and options
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-chartjs-2 53 changes
Breaking changes 3
Adds support for Chart.js v4.
CommonJS support is no longer available.
The package is now an ES module, affecting how developers import it.
react-chartjs-2 49 changes
Breaking changes 8
The default export is renamed to Chart.
Chart.js re-exports are removed.
The functional data prop is removed.
The getDatasetAtEvent prop is removed; a utility with the same name can be used instead.
The getElementAtEvent prop is removed; a utility with the same name can be used instead.
The getElementsAtEvent prop is removed; a utility with the same name can be used instead.
IE 11 is dropped for the regular bundle; the modern bundle targets browsers with ES6 modules support.
Chart.js tree-shaking is supported; developers must register Chart.js components themselves.
New APIs and options 1
A datasetIdKey prop is available.