Using with Chart.js v3
If your app needs Chart.js v3, please use a compatible version of this library:
pnpm add chart.js@^3.9.1 react-chartjs-2@^4.3.1yarn add chart.js@^3.9.1 react-chartjs-2@^4.3.1npm install --save chart.js@^3.9.1 react-chartjs-2@^4.3.1Also, please consider upgrading your app to Chart.js v4.
Upgrading to Chart.js v4
Section titled “Upgrading to Chart.js v4”First, upgrade packages. You'll need to install Chart.js v4 and a compatible version of this library:
pnpm add chart.js@^4.0.0 react-chartjs-2@^5.0.0yarn add chart.js@^4.0.0 react-chartjs-2@^5.0.0npm install --save chart.js@^4.0.0 react-chartjs-2@^5.0.0Then, please follow this guide.