Matt De Leon
Matt De Leon

Reputation: 757

Force Highcharts to show last x-axis label

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.

Upvotes: 2

Views: 780

Answers (1)

Core972
Core972

Reputation: 4114

Use xAxis.endOnTick - Doc link

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

Fiddle

Upvotes: 1

Related Questions