强制Highcharts显示最后一个x轴标签 [英] Force Highcharts to show last x-axis label
本文介绍了强制Highcharts显示最后一个x轴标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在下面的Highcharts图中,我希望x轴上的最后一个标签为2017,而不是隐藏.这样,就可以确定图表中的最后一年.
In the following Highcharts graph, I'd like the last label in the x-axis to be 2017 instead of hidden. That way it's crystal what the last year in the chart is.
我希望有一种方法可以将刻度间隔保持在2.换句话说,第一个标签是1999,最后一个标签是2017.
I'm hoping there's a way to accomplish this while keeping the tick interval at 2. In other words, the first label would be 1999, and the last would be 2017.
推荐答案
使用xAxis.endOnTick
-文档链接
xAxis: {
endOnTick: true,
showLastLabel: true // Default is true but just in case
},
这篇关于强制Highcharts显示最后一个x轴标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文