huy21110027781
Posts: 4
Joined: Sun May 01, 2022 8:53 am

xDateFormat not working

Hi,

I want to format tooltip datetime at xAxis and I added "xDateFormat" config to tooltip option already but it is not working.

Demo: https://jsfiddle.net/huy21110027781/c2semo5b/5/

Image

Thanks
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: xDateFormat not working

Hi huy21110027781,

Thanks for contacting us with your question.

xDateFormat property is not applied in this case, because you overwrite the tooltip value in the formatter callback. Using xDateFormat value in formatter should help in this case:
Demo:https://jsfiddle.net/BlackLabel/oxmcw48p/

Let me know if it was what you were looking for.
Regards!
Mateusz Bernacik
Highcharts Developer
huy21110027781
Posts: 4
Joined: Sun May 01, 2022 8:53 am

Re: xDateFormat not working

Hi mateusz.b,

Thanks a lot for your support. I did it.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: xDateFormat not working

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Stock”