-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Compile Error for Mixed Chart Type #358
Comments
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:
to
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 |
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
The text was updated successfully, but these errors were encountered: