I have successfully used this blog post to integrate Chart.js into my application.
I want to add zooming/panning functionality into the Chart and have not been able to get it to work when a map is on the page.
It works in this test page (see code below), where the Chart is the only thing on the page and I'm loading the ArcGIS JS library.
But when I try in my full application, with a map and other widgets, the chart renders and works, all except the panning/zooming.
Has anyone gotten the panning/zooming to work for chart.js?
Solved! Go to Solution.
Solved!!
Apparently, using a blog post from 2018 as an example is not a good idea.
I removed the dojoLoader part and the additions to the require array, then added the Chart.js and the zoom plugin using traditional script tags and it all works now!
just realizing.... In my actual application, I use the require () dojo syntax. I get an error (image added below) when I try and load the chart.js zoom plugin in the same manner (using dojoConfig) as the full Chart.js library, as noted in the blog post - https://community.esri.com/t5/esri-technical-support-blog/using-third-party-graphing-libraries-with-...
here's the dojoConfig and I also add the zoom plug in to the require array.
here's the error -
Solved!!
Apparently, using a blog post from 2018 as an example is not a good idea.
I removed the dojoLoader part and the additions to the require array, then added the Chart.js and the zoom plugin using traditional script tags and it all works now!