hi i am aware of the breaks, i am expecting the chart will be like this which is ok with the chart x axis initially set ordinal to true however i wish to set the ordinal setting to false and a break like thismateusz.b wrote: ↑Fri Oct 29, 2021 8:21 am Hello klhebs,
Not quite sure if that is an answer for your question, but even with ordinal: true breaks will be visible. Ordinal option makes sure that points are spaced equally regardless of the time, distance and different similar factors. Even though breaks doesn't show any data it is still meaningful and enabled ordinal option shows such periods, the only thing that is changed is regardless of the period length the space between points is exactly the same.
Demo: https://jsfiddle.net/BlackLabel/3tjqbuyw/
API reference: https://api.highcharts.com/highstock/xAxis.ordinal
Regards!
Code: Select all
chart.xAxis[0].update({
ordinal: false,
breaks: [
{
from: breakStartTimeStemp,
to: breakEndTimeStemp
// breakSize:
}
]
})
Code: Select all
chart.xAxis[0].update({
ordinal: true
breaks: []
})
Code: Select all
chart.xAxis[0].update({
ordinal: true,
breaks: undefined
})