[Chartjs]-Chart, X and Y-Axis labels are blurred in horizontal bar chart using chart.js

1👍

Resolved the Issue

We can’t give height and width to canvas in Chart.js. As per below document we should have dedicated div element for Canvas and give height and width to the div element(which i already did, check my code in question).

https://www.chartjs.org/docs/latest/general/responsive.html#configuration-options

After we should add below configurations for chart.

options: {
    responsive: true,
    maintainAspectRatio: false
    }

Leave a comment