[Chartjs]-Chart.js "minBarLength" not working as intended?

1👍

Simply tell your yAxes to beginAtZero by extending the options as follows:

options: {
  title: {
    display: true,
    text: "Custom Chart Title"
  },
  scales: {       
    yAxes: [{
      ticks: {
          beginAtZero: true
      }
    }]
  }
}

0👍

you probably do not have this issue anymore, but if anyone reads this.

I am using "chart.js": "3.8.0". When you set the min of the y-Axis for example to 1 you have to set the attribute "base" of the dataset to 1 as well so that minBarLength can work.

Leave a comment