Chartjs-Chartjs: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'HALF_PI')

0👍

Chart.js v3 comes with build in typing, the @types/chart.js are only for v2 so you will need to uninstall it

npm uninstall @types/chart.js

yarn remove @types/chart.js

0👍

Fixed this error by migrating properly from v2 to v3, using this guide https://www.chartjs.org/docs/latest/getting-started/v3-migration.html.

I can’t seem to find exactly where the bug is, but it seems to be related to chartjs-plugin-datalabels

Leave a comment