Reputation: 835
I used chartjs bar chart. It's for one year 52 week's based data show. So xaxis labels are 52.
And I will use option.responsive = true
for my chart fixed width & height.
But the chartjs is auto hide some xaxis label. I need to disable auto hide some xaxis label option.
Upvotes: 1
Views: 820
Reputation: 835
Use autoSkip option it's a possible way. For ex:
options.scales.xAxes[0].ticks.autoSkip = false
(or)
options: {
scales: {
xAxes: [{
ticks: {
autoSkip: false,
maxRotation: 90,
minRotation: 90
}
}]
}
}
Ref to : https://www.chartjs.org/docs/latest/axes/cartesian/?h=autoskip
Upvotes: 2