alexaugusto1
Posts: 15
Joined: Thu Mar 11, 2021 4:29 pm

Gantt chart randomly losing day of the date in the tooltip

Hi,

I am facing an odd behavior in the Grant chart.
Depending on the start/end date of some items in the chart, it loses the format of the date in other items, e.g., instead of showing "Apr 10, 2021" it shows "April 2021".

See the example bellow:
https://jsfiddle.net/alexaugusto/4ea9kz7w/54/

Around line 100 you can change the start/end that is commented and see that depending on which one is used the issue happens or not.
Attachments
The incorret one
The incorret one
dont.png (9.72 KiB) Viewed 2428 times
The correct one
The correct one
do.png (11.65 KiB) Viewed 2428 times
karolkolodziej
Posts: 895
Joined: Mon Mar 02, 2020 10:11 am

Re: Gantt chart randomly losing day of the date in the tooltip

Hi!
Thanks for contacting us with your question!

In order to resolve that issue, I suggest adding the 'xDateFormat' property to the tooltip options.
With that, you can be sure that all points in the tooltip will be shown in the same format.
You might check the available date formats in the second API link below.

API:
https://api.highcharts.com/gantt/tooltip.xDateFormat
https://api.highcharts.com/class-refere ... dateFormat

Demo:
https://jsfiddle.net/BlackLabel/q1aLkozh/


Let me know if you have any further questions!
alexaugusto1
Posts: 15
Joined: Thu Mar 11, 2021 4:29 pm

Re: Gantt chart randomly losing day of the date in the tooltip

Hi
It worked!
Thank you very much!
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: Gantt chart randomly losing day of the date in the tooltip

That's great to hear!
In case of any further questions, feel free to contact us again.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”