0
votes

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.

1

1 Answers

0
votes

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