Chartjs-Generate an indefinite number of charts as images (chart.js)

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>

Leave a comment