1๐
โ
I solved the problem by creating a separate canvas object for each chart.
Before the function for creating a chart is called, a new canvas object is created.
document.getElementById("chartcontent").innerHTML += "<canvas id='"+messstelle+"' height='150vw' width='400vw'></canvas>";
"chartcontent" in HTML:
<p id="chartcontent"></p>
Source:stackexchange.com