Force Highcharts to show last x-axis label

2019-08-08 08:51发布

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.

enter image description here

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.

标签: highcharts
1条回答
劳资没心,怎么记你
2楼-- · 2019-08-08 09:10

Use xAxis.endOnTick - Doc link

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

Fiddle

查看更多
登录 后发表回答