3
I realize Iโm super late on this, but maybe you should try setting the distribution
option to series
. See the documentation here:
Scale Distribution
The distribution property controls the data distribution along the
scale:'linear': data are spread according to their time (distances can vary) 'series': data are spread at the same distance from each other
This should fix that weird formatting that you have where the spacing is all mucked up.
1
You should modify axis settings to set max and min value (start-end date range probably). An example (NB! Use your own required formats):
time: {
unit: 'month',
displayFormats: {
month: 'MM'
},
max: moment(data.end_date).format('MM'),
min: monent(data.start_date).format('MM')
}
0
You can add isoWeekday: true
into time
config
https://www.chartjs.org/docs/latest/axes/cartesian/time.html
Source:stackexchange.com