Reputation: 3
I need to set the fixed xAxis value like that picture , like that picture I tried to set this, but it can't :
tickPositioner: function(min, max) {
var result = []
let today = moment().subtract(4,`day`).format("YYYY-MM-DD")
let tomorrow = moment().subtract(3,`day`).format("YYYY-MM-DD")
result.push(moment(`${today} 06:00:00`).unix()*1000)
result.push(moment(`${today} 12:00:00`).unix()*1000)
result.push(moment(`${today} 18:00:00`).unix()*1000)
result.push(moment(`${tomorrow} 00:00:00`).unix()*1000)
result.push(moment(`${tomorrow} 06:00:00`).unix()*1000)
result.info = this.tickPositions.info;
return result;
}
I don't know how to set these values ?
Upvotes: 0
Views: 44
Reputation: 4114
You need to use the xAxis.tickInterval
API documentation like this :
xAxis: {
tickInterval: 21600000
}
Upvotes: 1