You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are quite a few tutorials out there on how to use Charts with Vue, and some even showcase an early version of nuxt 3. But things have changed a lot in the Nuxt world, and I have to admit that I struggle quite a bit to charts.js running in Nuxt 3.4.
So far I have installed "chart.js": "^4.3.0", and "vue-chartjs": "^5.2.0". I did try to build a plugin, which used NuxtApp.Vue.use(chart), but it kept throwing errors like Charts.js does not procide a default export (or similar, I am writing from memory).
So how do I have to use Charts.js in Nuxt 3? As a plugin? Or a component? Or simply with imports (which Nuxt does not need anymore)?
Would the be a chance to provide a stackblitz or codesandbox example? That would be extremely helpful – thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
There are quite a few tutorials out there on how to use Charts with Vue, and some even showcase an early version of nuxt 3. But things have changed a lot in the Nuxt world, and I have to admit that I struggle quite a bit to charts.js running in Nuxt 3.4.
So far I have installed
"chart.js": "^4.3.0",
and"vue-chartjs": "^5.2.0"
. I did try to build a plugin, which usedNuxtApp.Vue.use(chart)
, but it kept throwing errors likeCharts.js does not procide a default export
(or similar, I am writing from memory).So how do I have to use Charts.js in Nuxt 3? As a plugin? Or a component? Or simply with imports (which Nuxt does not need anymore)?
Would the be a chance to provide a stackblitz or codesandbox example? That would be extremely helpful – thank you!
Beta Was this translation helpful? Give feedback.
All reactions