sayed
Posts: 13
Joined: Tue Oct 13, 2020 8:07 am

How to show first and last date ticks in the navigator?

Hello,
I was wondering if it's possible to show the first and last date ticks in the navigator.

I added xAxis to the navigator and created tickPositioner function to return the linear ticks positions with the first and last.
But this is not working as I would expect.
gantt-first-last-ticks.PNG
gantt-first-last-ticks.PNG (7.77 KiB) Viewed 2837 times
Live Demo: https://jsfiddle.net/Sayed110/3Lfhq5ze/22/

Thanks
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: How to show first and last date ticks in the navigator?

Hi,
We appreciate you reaching out to us!

As far as I can see, when you turn off tickPositioner the navigator show ticks first 1 dec and last 6 dec

Do you want to set something like at this example?
https://jsfiddle.net/BlackLabel/sf20gc6j/

I changed how navigator.xAxis according to the documentation.
https://api.highcharts.com/gantt/navigator.xAxis

I'm waiting for news from you.
Best regards.
Sebastian Hajdus
Highcharts Developer
r6190
Posts: 6
Joined: Wed Jan 31, 2024 4:27 pm

Re: How to show first and last date ticks in the navigator?

Hi,

I am new to highcharts. I am working on live graph and I need to show first and last date on navigator x-axis, but I am not able to achieve it. How do I show the endpoints date?
jedrzej.r
Posts: 725
Joined: Tue Jan 24, 2023 11:21 am

Re: How to show first and last date ticks in the navigator?

Hi!

Thanks for reaching out to us with your inqury!

You can achieve this by setting the labels.align property to right, so that all tick labels are shown on the navigator. In case you want to show only first and last date on the navigator, you can use the tickPositioner callback to return the desired values.

Demo: https://jsfiddle.net/BlackLabel/1cuhwbfg/

API:
https://api.highcharts.com/gantt/naviga ... Positioner
https://api.highcharts.com/gantt/naviga ... bels.align

Let me know if that's what you were looking for.
Best regards!
Jędrzej Ruta
Highcharts Developer

Return to “Highcharts Gantt”