Any chart / widget has a resize event defined in its code , like :
window.addEventListener('resize', resize, false);So, when the browser is resized, all charts and widgets are also resized.
var canvas = document.getElementById(id);
Why is not the element id found?
And then it struck me: The resize event is registered for some charts/widgets and when we change the dashboard those listeners are still active, the browser notifies them about the event, but the components are not found inside the page anymore, so the canvas is null for them.