1👍
You have to add a canvas element as the base of the chart. Change the html to:
<div class="chart-container">
<canvas id="chart"></canvas>
</div>
- [Chartjs]-Chart.js – cannot fetch result from MySQL via PHP
- [Chartjs]-Can't change color line with chart.js
1👍
Instead of div please use canvas like below.
<canvas id="chart"></canvas>
- [Chartjs]-How to get React chartjs to resize back down with window
- [Chartjs]-How do i make a new chart by pressing a button (chart.js)?
Source:stackexchange.com