[Chartjs]-How to make chartjs pie chart responsive

1๐Ÿ‘

โœ…

As stated in the documentation, to make your chart responsive you will need to put it in a div which you make responsive (https://www.chartjs.org/docs/latest/general/responsive.html?h=responsive)

<div class="chart-container" style="position: relative; height:40vh; width:80vw">
   <canvas id="chart"></canvas>
</div>

Leave a comment