问题
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