score:0

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

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

score:1

you have the barthickness option as mentionned in the docs here -> http://www.chartjs.org/docs/#bar-chart-chart-options

score:1

while this is not an official fix, it worked for me. i took advice from this link, https://github.com/chartjs/chart.js/issues/2787

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>
</div>

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

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

score:2

simply increase the canvas height. for example;

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


Related Query

More Query from same tag