Chartjs-Generating a simple static plot with Chart.js

0👍

While trying to reproduce the issue using jsfiddle, I created this:
https://jsfiddle.net/6do1y9m8/

<html>
<head>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
    <canvas id="StaticPlot"></canvas>
</body>
</html>

The JavaScript part has not been modified.

In order to work properly, in your html code, you need to make sure that there is a canvas node, where the id is StaticPlot.

Note: If you are using a div instead of a canvas, the getContext() will fail.

Leave a comment