Using with Chart.js v2
If your app needs Chart.js v2, please use a compatible version of this library:
- yarn
- pnpm
- npm
yarn add chart.js@^2.9.4 react-chartjs-2@^2.11.2
pnpm add chart.js@^2.9.4 react-chartjs-2@^2.11.2
npm install --save chart.js@^2.9.4 react-chartjs-2@^2.11.2
Also, please consider upgrading your app to Chart.js v3.
Upgrading to Chart.js v3​
First, upgrade packages. You'll need to install Chart.js v3 and the latest version of this library:
- yarn
- pnpm
- npm
yarn add chart.js@^3.6.0 react-chartjs-2@^4.0.0
pnpm add chart.js@^3.6.0 react-chartjs-2@^4.0.0
npm install --save chart.js@^3.6.0 react-chartjs-2@^4.0.0
Then, please follow the this guide.