chartjs / chartjs/chartjs-plugin-datalabels
Bug: chartjs-plugin-datalabels throws Cannot read properties of null (reading 'x') on pie/doughnut charts in Filament
- Dominant language
- JavaScript
- Stars
- 920
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
## Bug: `chartjs-plugin-datalabels` crashes on `pie` / `doughnut` charts with `Cannot read properties of null (reading 'x')`
## Summary
When using `chartjs-plugin-datalabels` in a Filament `ChartWidget`, `line` and `bar` charts work as expected, but `pie` and `doughnut` charts throw a runtime error in the browser console.
The chart still renders in some cases, but the plugin crashes during draw / hover lifecycle.
## Error
```text
filament-chart-js-plugins-GIOcJBUD.js:2 Uncaught TypeError: Cannot read properties of null (reading 'x')
at Xt (filament-chart-js-plugins-GIOcJBUD.js:2:587)
at Object.fallback [as positioner] (filament-chart-js-plugins-GIOcJBUD.js:2:2287)
at He (filament-chart-js-plugins-GIOcJBUD.js:2:7473)
at Object.draw (filament-chart-js-plugins-GIOcJBUD.js:2:8998)
at Object.afterDatasetsDraw (filament-chart-js-plugins-GIOcJBUD.js:2:11522)
at W (chart.js?v=5.3.5.0:1:8440)
at Yn._notify (chart.js?v=5.3.5.0:1:112904)
at Yn.notify (chart.js?v=5.3.5.0:1:112690)
at yt.notifyPlugins (chart.js?v=5.3.5.0:1:131066)
at yt._drawDatasets (chart.js?v=5.3.5.0:1:127305)
```
## Screenshots
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.