Chartjs-ChartJS have xAxes labels match data source

0👍

The ticks appear at the begin of each time.unit. When choosing time.unit: 'week', in your case, the ticks appear on each Sunday, also because time.stepSize defaults to 1.

There’s probably no predefined single option that allows you to obtain what you’re looking for. You can however solve the problem as follows:

  1. Generate and define the data.labels you want to see on the x-axis.
  2. Define the option ticks.source: 'labels' for the x-axis.

Please take y look at this answer that deals with a similar issue.

Leave a comment