Consider this little chart.js
chart:
new Chart(ctx, {
type: 'horizontalBar',
data: {
labels: ['some veeeery loong label', '2', '3', '4', '5'],
datasets: [{
data: [100, 96, 84, 76, 69]
}]
},
options: {
scales: {
yAxes: [{
ticks : {
maxRotation : 90,
minRotation : 90
}
}]
}
}
});
I have a question regarding the y-axis label rotation here. It works but results in a big gap on the left of the chart. In fact thats the same space that would be used if I don't rotate.
This picture shows what I mean:
Is this intentional behavior of chart.js
or do I miss something here. And what is the best way to rearrange my chart using the full space.
My only idea is using options.layout.padding.left = -80
. But this looks like a very bad approach to me.