Below is the code snippet for scale configuration, which shows error on browser console.
The Error shown in console as: "Invalid scale configuration for scale: x"
Moreover, if I remove [ ] brackets for x, the chart does not load. Help me understand the error and ways to solve the same.
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
x: [{
type: 'time',
time: {
unit: 'hour'
}
}],
y: {
beginAtZero: true
}
}
}