0👍
Assuming your x-axis is already defined as a time cartesian axis, you can define the option time.displayFormats.day
in order to see the date in the desired format.
This could look as follows:
xAxes: [{
type: 'time',
time: {
unit: 'day',
displayFormats: {
day: 'DD-MMM-YYYY'
},
tooltipFormat: 'DD-MMM-YYYY'
}
}]
- Chartjs-How to get ChartJs object from dynamically created chart
- Chartjs-How to display a progress over time in one horizontally stacked bar with chartjs
Source:stackexchange.com