Uncaught Type Error #277
Unanswered
chaos-language
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a working project that I'm trying to add chartjs-plugin-datalabels to. I followed the getting started guide and added lines 3 and 6 below to import into my project.
`import { Chart, registerables } from 'chart.js';
import 'chartjs-adapter-date-fns';
import ChartDataLabels from 'chartjs-plugin-datalabels';
Chart.register(...registerables);
Chart.register(ChartDataLabels);`
I haven't integrated the plugin yet. The import alone is giving me a "Uncaught TypeError: Cannot read properties of undefined (reading 'HALF_PI')". If I comment out lines 3 and 6, the project works fine.
![chart-datalabels-error](https://user-images.githubusercontent.com/90115708/133450722-72993f44-c179-4e13-a543-7bfdcba9caff.jpg)
Dependency list below:
"dependencies": {
"chart.js": "^3.5.1",
"chartjs-adapter-date-fns": "^2.0.0",
"chartjs-plugin-datalabels": "^2.0.0",
"date-fns": "^2.23.0"
},
"devDependencies": {
"snowpack": "^3.8.8"
}
I am using snowpack for testing and building. Anything I am missing? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions