Chartjs-Diplay multiple chart js Diagrams on one page

0👍

Chart.js uses the HTML5 <canvas> element to contain the charts – as in the line.html sample:

<body>
<div style="width:75%;">
    <canvas id="canvas"></canvas>
</div>

I don’t see a <canvas> element in your <body> code.
That element is then used in the JavaScript to create the chart element:

    window.onload = function() {
    var ctx = document.getElementById("canvas").getContext("2d");
    window.myLine = new Chart(ctx, config);
};

Leave a comment