just add height tag in canvas element. this solved for me.

<canvas id="chart" height="50">


you have the barthickness option as mentionned in the docs here ->


while this is not an official fix, it worked for me. i took advice from this link,

i store all my values within multiple arrays, so count number of objects and multiply by a specific number and set height of your chart wrapper ( div around the chart ).

<div class="chart-wrapper horizontalbar" style="position: relative; height: 50vh;">
    <canvas id="chart-location"></canvas>

then after the chart is drawn, set the height (location_labels is an array housing all my labels)

$( ".horizontalbar" ).height(location_labels.length * 30);


simply increase the canvas height. for example;

<canvas id="horizontalbar" height="1000px"></canvas>

Related Query

More Query from same tag