Hi!
Sorry for digging out this old thread, but I'm interested in customising my chart. I followed the suggestions here but I'm stuck. Maybe an image first:
Depending on the multistate switch I display the data. But I want to adjust the x-axis labels depending on the time interval. For the case in the image I'd like to have tick labels every 10 minutes. I tried:
{
"options": {
"scales": {
"xAxes": [
{
"type": "time",
"time": {
"displayFormats": {
"millisecond": "HH:mm",
"second": "HH:mm",
"minute": "HH:mm",
"hour": "HH",
"day": "MMM D"
},
"unit": "minute",
"stepSize": 10
},
"ticks": {
"display": true,
"fontSize": 11,
"maxRotation": 50
},
"gridLines": {
"display": false,
"drawBorder": false,
"drawOnChartArea": true,
"drawTicks": true,
"tickMarkLength": 5
}
}
]
},
"legend": {
"display": true
}
}
}
How do I tell the chart to show me tick labels every 10 minutes? I thought that
"stepSize": 10
was the option I needed, but it doesn't have an effect. Even if I use 1 or 1000. There must be something I didn't quite understand in the docs, can somebody give me a hint please? Thanks in advance!