jdomsky
Posts: 1
Joined: Tue Oct 06, 2020 7:34 pm

Force Chart to Add an Extra Tick

We have an issue (jsfiddle below) where one of our datalabels is getting cut off. After trying some different configurations I'm wondering is there a way to tell highcharts to include an extra tick?

If I could get the chart to go to 25 instead of 20 it would solve the issue. I'm limited in my options here as we populate the series and category data dynamically so I can't always assume the yAxis tickInterval can be set to something like 3 (which fixes our issue and gave me the idea)

I'm also limited on space and can't give the the chart more room to render which seems to fix the issue as well.

https://jsfiddle.net/jdomsky/1b9koqnt/1/
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: Force Chart to Add an Extra Tick

Hello jdomsky!

We appreciate you reaching out to us!

You can set max property to 21 and then set endOnTick property to false. It should fix your issue.

API references:
https://api.highcharts.com/highcharts/yAxis.max
https://api.highcharts.com/highcharts/yAxis.endOnTick

Demo:
https://jsfiddle.net/BlackLabel/4xLu8hkg/

Let me know if that was what you were looking for!
Best regards!
Dominik Chudy
Highcharts Developer

Return to “Highcharts Usage”