0👍
your "graphDiv" html element needs to be a canvas. not a div.
<canvas id="myChart" width="100%" height="50%"></canvas>
You also have the wrong id on your ctx variable.
let ctx = document.getElementById('myChart').getContext('2d'); // canvas
- Chartjs-Chartjs Horizontal Bar, the width of the Bars does not change
- Chartjs-Chartjs : Y axis starting with highest datapoint
Source:stackexchange.com