I’m using Angular 14
What is the proper way to dispose (destroy) charts when user navigates between pages? When it happens quite quick there are possible errors like:
– ERROR TypeError: Cannot read properties of undefined (reading ‘style’)
at n._updateOptions (canvasjs.min.js:170:13)
at n._initialize (canvasjs.min.js:172:356)
at n.render (canvasjs.min.js:205:264)
– ERROR TypeError: Cannot set properties of undefined (setting ‘container’)
at n.destroy (canvasjs.min.js:157:273)
– Canvas2D: Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true.
I called destroy() function on all charts in OnDestroy, but it still produce randomly those errors
As for the last I saw an info in documentation but it doesn’t helped me
Thanks