Chartjs-How to make ticks not extend past left of chart?

2๐Ÿ‘

โœ…

I think you could try to change the ticks alignment, something like the following:

x: {
  type: 'time',
  ticks: {
    display: true,
    stepSize: 7,
    align: 'inner' // to align the start and end ticks in the chart area width
  },
  grid: {
    drawTicks: false,
    display: false,
  },
  border: {
    display: true,
  },
},

Leave a comment