1👍
According to this: https://www.chartjs.org/docs/latest/general/responsive.html#important-note, looks like for the responsive
attribute to work correctly, the parent element needs to be sized using relative units. Their code example is:
<div class="chart-container" style="position: relative; height:40vh; width:80vw">
<canvas id="chart"></canvas>
</div>
- Chartjs-How can I use npm-plugins with react-chartjs-2?
- Chartjs-How to show bar chart labels clearly using ChartJS?
Source:stackexchange.com