I'm trying to set the tick marks in the xAxis (datetime) to always be at 9:30, 12:45 and 16:00hs. Using timestamp in milliseconds.
This is the xAxis object in the config.
Code: Select all
xAxis: {
title: {
useHTML: true,
text: `<span class="highcharts-axis-title-dot"></span> Time`
},
labels: {
y: 30
},
showFirstLabel: true,
showLastLabel: true,
units: [[
'minute',
[15, 30, 45]
], [
'hour',
[4, 9, 12]
]],
tickInterval: 11700000,
ordinal: false,
},
But I'm only managing to show two ticks at 12:00 and 16:00hs as seen in the image below. The showFirstLabel is'nt working properly and the tickInterval neither.
I'll always have data from 9:30 to 16hs, but the date part of the timestamp changes from day to day.
This is what I'm actually looking for Is there any mistake in the xAxis object? Is there other way to set specific ticks in the datetime axis? Is the units array syntax correct? (took it from the documentation)
Thanks in advance! I'm a little stuck with this haha