我的xAxis折线图如下:
xAxis: {
type: 'datetime',
dateTimeLabelFormats: {
minTickInterval: 24 * 3600 * 1000,
day: '%e %b'
},
title: {
text: null
}
},
yAxis: {
title: {
text: null
},
labels: {
formatter: function() {
return this.value;;
}
}
},
tooltip: {
formatter: function() {
return '<b>'+ this.y +' '+
'at ' + Highcharts.dateFormat('%e %B', this.x);
}
}
它在工具提示中显示正确的日期格式 - “3月4日的232”。但是XAXIS - 11:03:00.000
如何只显示日期和月份?
答案 0 :(得分:1)
你应该设置毫秒,而不是白天。
dateTimeLabelFormats: {
minTickInterval: 24 * 3600 * 1000,
millisecond: '%b %e'
},