chartjs / chartjs/chartjs-plugin-datalabels
Crashes on Chart.js 4.4.1 and 4.4.0
- Dominant language
- JavaScript
- Stars
- 920
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I'm trying to make it work with Chart.js server side, node.js 19 and chartjs-plugin-datalabels version 2.2.0
Chart.js 4.4.1 or 4.4.0 - same error
here is the log:
```
someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:121
var x0 = origin.x;
^
TypeError: Cannot read properties of null (reading 'x')
at orient (someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:121:19)
at Object.fallback [as positioner] (someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:345:13)
at coordinates (someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:841:21)
at Object.draw (someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:1012:18)
at Object.afterDatasetsDraw (someProject\node_modules\chartjs-plugin-datalabels\dist\chartjs-plugin-datalabels.js:1305:12)
at callback (file:///someProject/node_modules/chart.js/dist/chunks/helpers.segment.js:79:19)
at PluginService._notify (file:///someProject/node_modules/chart.js/dist/chart.js:5073:17)
at PluginService.notify (file:///someProject/node_modules/chart.js/dist/chart.js:5056:29)
at Chart.notifyPlugins (file:///someProject/node_modules/chart.js/dist/chart.js:6338:30)
at Chart._drawDatasets (file:///someProject/node_modules/chart.js/dist/chart.js:6081:14)
```
Node.js v19.9.0
Just in case:
```
"dependencies": {
"axios": "^1.6.7",
"canvas": "2.10.2",
"chart.js": "4.4.0",
"chartjs-plugin-datalabels": "^2.2.0",
"docx": "^8.5.0"
}
```
Any help will be appreciated!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.