Force Highcharts to show last x-axis label

淺唱寂寞╮ 提交于 2019-12-11 06:44:23

问题


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.

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.


回答1:


Use xAxis.endOnTick - Doc link

xAxis: {
    endOnTick: true,
    showLastLabel: true // Default is true but just in case
},

Fiddle



来源:https://stackoverflow.com/questions/48894017/force-highcharts-to-show-last-x-axis-label

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!