1๐
โ
Install type chart
npm install @types/chart.js
5๐
That happened because of version incompatibility. Try to change ChartDataSets
to ChartDataSet
.
Here is working sample on StackBlitz
Also you can see this
2๐
"ng2-charts": "^2.4.2", "chart.js": "^2.9.3",
1๐
you need to upgrade the version:
"chart.js": "^4.0.0",
"react-chartjs-2": "^5.0.0",
Package JSON file.
Source:stackexchange.com