score:0

you could define xaxes.ticks.stepsize: 10 as follows:

options: {
  scales: {
    xaxes: [{
      ticks: {
        min: 1,
        max: 45,
        stepsize: 10
      }
    }]
  }    
}  

please consult the chapter tick options from the chart.js documentation.

score:0

found the answer.

you can do

const xvalues0 = array.from({length: n}, (_, index) => index + 1);
const xvalues = xvalues0.map(x => x * (timeinterval/(1000*60))); 

Related Query

More Query from same tag