17👍
Guess you are trying to import chart.js like this import Chart from 'chart.js'
, since chart.js v3 chart.js is treeshakable so you will have to import and register all the components you want to use or import and register everything with the auto import like this: import Chart from 'chart.js/auto'
Docs: https://www.chartjs.org/docs/master/getting-started/integration.html#bundlers-webpack-rollup-etc
- [Chartjs]-Can't make chart js responsive
- [Chartjs]-How can I make two of my lines in Chart JS thicker
5👍
For me, I just had to downgrade from chart.js@3.x to chart.js@2.9.4
Source:stackexchange.com