Open Quska45 opened 1 year ago
This is correct, the window object is not available in web workers, which version of chart.js and zoom plugin are you using?
This is correct, the window object is not available in web workers, rendering the chart in an offscreen canvas will return a static image of the chart and not an interactable chart. So the zoom plugin has 0 added value in this case. You can disable the zoom plugin by providing false for the zoom section in the plugins options.
Thank you for reply. I think that you mean zoom plugin not available In web worker and offscreen both. If I tried to use only offscreen, but even then, zoom plugin will not work? I want to handle huge data, so i really need web worker and offscreen. If you dont mind, please give some advice for this.
If you want to use offscreen canvas API (which you need in webworkers) you can't use the zoom plugin, so you will have to choose which one you want.
You can take a look at this page for some performance tips: https://www.chartjs.org/docs/master/general/performance.html
Disabling the zoom plugin via 'options.plugins.zoom = false' does not prevent the error from happening. Dito for options.plugin.zoom.zoom.
Hi. i really enjoy your work in chartjs zoom plugin. Thank you.
But i have some ploblem use web worker.
When i use Web Worker, i get 'window is not defined'.
You have some idea this situation?
I use vite.