I'm trying to use the chart.js zoom plugin with my Qlik Sense extensions. Qlik is not really relevent here I guess but I will mention it anyways.
So here is how I try to load the plugin via require.js:
require.config({
paths: {
chart: "//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min",
datalabels: "//cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@0.3.0/dist/chartjs-plugin-datalabels.min",
zoom: "//cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-zoom/0.6.3/chartjs-plugin-zoom.min"
},
map: {
datalabels: {
"chart.js": "chart"
},
zoom: {
"chart.js": "chart"
}
}
});
I had a similar issue with the datalabels plugin, but it was solved by the mapping in the above code snippet.
The error I always keep getting is
Uncaught TypeError: Cannot read property 'helpers' of undefined
This is coming from line 11 here .
Any help on how should I require this plugin to overcome this error? I have tried to search for a solution with no luck so far. Thanks in advance.