Open isaacsando opened 1 year ago
I have the exact same problem using Ionic and Angular
I was able to get this to compile by changing the interface name ChartDatasetProperties to ChartDatasetPropertiesCustomTypesPerDataset in types/index.d.ts:
interface ChartDatasetProperties<TType extends ChartType, TData> {
to
interface ChartDatasetPropertiesCustomTypesPerDataset<TType extends ChartType, TData> {
It seems to work as expected after making this change.
Any updates on fixing this in core?
I get this problem when I simply declare the options in options.plugins.datalabels
.
This issue is still active.. I keep having my TS linter complaining.
Any news on this issue? I am also having the same problem, I have chart js v 3.9.1 and chartjs-plugin-datalabels v 2.2.0 and my ts linter is complaining for data labels with error TS2353
Issue
I'm unable to get the below TypeScript to compile due to a type error when using a mixed chart type. According to the Chart.js documentation the type property is set on each dataset when creating a mixed chart (not outside of it like all other charts). The chartjs-plugin-datalabels documentation states that the plugin options can be set per data level so I'm unsure as to why this error is happening. Any insight is appreciated. Thank you!
Here is the full error:
Environment Info
I'm using VS Code for editing and Webpack when compiling.
Chart.js: 4.0.1 chartjs-plugin-datalabels: 2.2.0
TypeScript: 4.9.4 tsconfig.json
webpack.config.js