我有从二月到十二月每个月的月底数据。在xAxis上,我想显示日期和月份,比如29.feb,31.dec等等,我使用了刻度间隔和日期时间标记格式,如下所示:
xAxis : {
type: 'datetime',
tickInterval: 3600*1000,//time in milliseconds
datetimelabelformats:{
day: '%e. %b',
month: '%b \'%y',
year: '%y'
}
},它的显示日期类似于3月21日,4月25日,但我不能像3月31日那样显示月末日期。有人能帮忙吗?这是小提琴
发布于 2017-01-09 11:16:16
晚了,但我觉得你应该用labels,
xAxis:{
labels: {
formatter: function() {
return Highcharts.dateFormat('%e. %b', this.value -
3600000 //needed otherwise it will start from 1 date of month
);
}
},
...
}https://stackoverflow.com/questions/41541836
复制相似问题