0👍
✅
Simple spelling mistake. It’s xAxes
not xAxis
. (And I set scaleLabel to display: true
, because I don’t know, what Chart.js version you using)
scales: {
xAxes: [
{
//display: true,
type: 'time',
time: {
parser: 'MMM D',
unit: 'day',
displayFormats: {
day: 'MMM D'
}
},
ticks: {
source: 'dataChart'
},
scaleLabel: {
display: true
}
}
],
yAxes: [
{
ticks: {
beginAtZero: true
},
scaleLabel: {
display: true
}
}
]
}
Source:stackexchange.com