ERROR Error: Uncaught (in promise): TypeError: chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables is not iterable (cannot read property undefined) TypeError: chart_js__WEBPACK_IMPORTED_MODULE_0__.registerables is not iterable (cannot read property undefined) at 16667 (ng2-charts.mjs:253:7)
I have recently upgraded to Angular 16 and I was using previously "ng2-charts": "2.4.2" and now upgraded it to v5.0.3. and facing this above error.
To Solve this error,
- Deleted Node modules and package-lock.json files and folder and reintalled it. Nothing impacted. Still getting same error.
- downgraded the version of ng2-charts but still getting same error.
Upgrading chart.js e ng2-charts worked for me on Angular 17