Is there a way to set the vertical thickness of the horizontal bars in ChartJS(3.7.0). Or change the zoom level or something?
I have a recordset with 50 rows which should show 50 horizontal bars. However when the chart is rendered. The lines representing the horizontal bars are barely visible.
I am using this config:
const config = {
type: 'bar',
data: chart_data,
options: {
maintainAspectRatio: false,
scales: {
yAxes: [{
barThickness: 20, // number (pixels) or 'flex'
maxBarThickness: 22 // number (pixels)
}]
},
indexAxis: 'y',
plugins: {
legend: {
position: 'right',
},
}
}
};
I am also setting the bar and max thickness in each dataset as well. Also set the height of the parent <div> which houses the <canvas> tag to a large value 3200px.
Thanks