nandoschelba
Posts: 1
Joined: Fri Jul 01, 2022 6:42 pm

Tooltip date format to show the day, month and year

Hello everyone. I had to put my date labels in xaxis categories due to a problem with ordinal (it was hidding some dates with data).

So I have xaxis categories being filled with already formatted dates, for example ['25/10/2021', '26/10/2021', '27/10/2021']. My tooltip also show the same thing.

Before that, all my data was in the data.csv, and I was able to show the same date format in xaxis, but my tooltip was displaying the weekday, month and year.

How can I remain my date labels in xaxis categories and format my tooltip in a different way? (weekday, month and year)

Thanks for the help.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Tooltip date format to show the day, month and year

Hello,

Welcome to our forum and thank you for contacting us with your question!

In your case I would suggest using the tooltip.formatter method. That way you can style the tooltip's content however you like.
API Reference: https://api.highcharts.com/highcharts/tooltip.formatter

Let me know if that's what you were looking for,
Regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”