in a template node, and I create two charts (1 with chart node, 1 with chart.js ) the one with chart node disappears and is no longer updated if I change page (error in console
TypeError: Cannot read properties of undefined (reading 'updateScaleDefaults')
at app.min.js:614:5434
at app.min.js:193:38
at Yg.completeTask (app.min.js:189:231)
at app.min.js:73:229
)
and that chart.js doesn't work properly the zoom (any zoom you do shows only the first data)
it happens only if type line, if type bar works perfectly (it doesn't give any error in console)
Only chart.js graphs can be made to work perfectly
Thank you
If you load chart.js from the jsdelivr cdn, that will load version 4.2.1
but the Dashboard already loads Version: 2.3.0 for its own use with the Chart node
So the problem you are seeing is due to a clash of versions .. significant changes in the library with breaking functionality.
possible solutions to this could be, not to load the chart.js from cdn and use the 2.3.0 (already preloaded) and try to find a chartjs-plugin-zoom that is compatible with chart.js 2.3.0
use Apexcharts that in my opinion have a nicer zoom feature Zoomable Timeseries