The above solutions are fine but if you want to show the date in the header section of the tooltip you can do this
In the headerFormatter you can get the formatted date by {point.key}
So the code will be:
tooltip: {
headerFormat: '<b>{series.name}, Date: {point.key}</b><br>',
pointFormat: '{point.y} Kg'
}
If you want to further format the date you can add the property xDateFormat
So the code will be like this:
tooltip: {
headerFormat: '<b>{series.name}, Date: {point.key}</b><br>',
pointFormat: '{point.y} Kg'
xDateFormat: '%B, %Y',
}
Currently these formats are supported:
* %a: Short weekday, like 'Mon'.
* %A: Long weekday, like 'Monday'.
* %d: Two digit day of the month, 01 to 31.
* %e: Day of the month, 1 through 31.
* %b: Short month, like 'Jan'.
* %B: Long month, like 'January'.
* %m: Two digit month number, 01 through 12.
* %y: Two digits year, like 09 for 2009.
* %Y: Four digits year, like 2009.
* %H: Two digits hours in 24h format, 00 through 23.
* %I: Two digits hours in 12h format, 00 through 11.
* %l (Lower case L): Hours in 12h format, 1 through 11.
* %M: Two digits minutes, 00 through 59.
* %p: Upper case AM or PM.
* %P: Lower case AM or PM.
* %S: Two digits seconds, 00 through 59
ESEMPIO
text from the code supposed to show? Also, this answer is pretty much a copy of the one posted a few hours earlier. – Afrikah