Chartjs-Chartjs – Not taking the height in reponsive chart

2👍

Have you tried giving height directly to the canvas instead of that wrapper div?

try this css.

    canvas{
        width: 100% !important;
        max-width: 1000px;
        height: auto !important;
    }

and

<canvas id="canvas" width="1000" height="300"></canvas>

This code works on mine.

Leave a comment