[Chartjs]-The expected type comes from property 'XAxes' and 'yAxes' which is declared here on type '_DeepPartialObject<{ [key: string]:

2๐Ÿ‘

โœ…

From the error it seems like you are running chart.js version 3, while your config is v2 syntax so it might need chart.js version 2,

try running npm i chart.js@2.9.4 to install the latest version of v2, than it should work.

0๐Ÿ‘

It seems that you are using version v.3.x.x, the implementation has changed with respect to v.2.x.x, as indicated:

barChartOptions: ChartConfiguration<'bar'>['options'] = { ... }

this will fix the error you get and not back step in version.

Leave a comment