Chartjs stepSize by 5

πŸ‘:0

stepSize should work as seen in this example with a forced stepsize of 1: (https://jsfiddle.net/Leelenaleee/zk4x0pun/2/).

    yAxes: [{
      ticks: {
        suggestedMin: 0, 
        suggestedMax:15,
        stepSize: 1,
        beginAtZero: true
      }
    }]

Can you check the version that you are using because maby it was a bug in an old version. Latest stable version is 2.9.4

πŸ‘:0

It’s a bit late πŸ™‚ but you can use this.

 yAxes: [
  {
    ticks: {
      callback: function(value) {
        return parseFloat(value).toFixed(0);
      },
      autoSkip: true,
      maxTicksLimit: 10,
      stepSize: .2
    }
  }
]

Leave a comment