-
Notifications
You must be signed in to change notification settings - Fork 332
Closed
Description
Hi,
is there a way how to use this plugin in Nuxt.js ?
- If i import the plugin in the component, nuxt gives me 'window not defined' which i understand as it tries to import it on server side
- If i create a Nuxt.js plugin
zoom.client.jslike this :
import Vue from 'vue'
import * as Zoom from 'chartjs-plugin-zoom'
Vue.use(Zoom)
and then register it as a nuxt.js plugin i dont really know how to register that plugin in the component, like, how do i call something like Chart.register(Zoom) or something to make it work ?
- Lastly as the nuxt.js plugin way is a mystery to me, I've tried to include cdn links in head but that crashes on
Uncaught TypeError: Cannot read properties of undefined (reading 'helpers')
at Object.2.chart.js (Chart.Zoom.min.js:10:3567)
at o (Chart.Zoom.min.js:10:254)
at t (Chart.Zoom.min.js:10:421)
at Chart.Zoom.min.js:10:438
So is there a way how to make the zoom plugin work ? I've spent two nights trying to figure this out but without luck :/
Metadata
Metadata
Assignees
Labels
No labels