0👍
This is my setting, using v3.6.0.
You can ignore y axis, just let you know mine works.
scales: {
x: {
type: 'time',
time: {
unit: 'minute',
stepSize: 30
},
min: tradingDuration().openTime,
max: tradingDuration().closeTime
// title: {
// display: true,
// text: 'Date'
// }
},
y: {
min: limitDown,
max: limitUp
}
},
- Chartjs-Get x.getPixelForValue(i) in a chartjs plugin with a time type scale
- Chartjs-Change points labels in chartJS and Flask
Source:stackexchange.com