score:1

Accepted answer

It is not working because there is no such thing as xAxis.tooltip. There is just one tooltip, and you can modify it using the tooltip.formatter. The string that will be returned by the tooltip.formatter will become the tooltip content, so that's the place where you can affect the x value.


chartOptions: Highcharts.Options = {
...

   tooltip: {
      formatter() {
         return `xAxis value: ${moment(this.x).format('MM.DD.YY HH:00-HH:59')}, 
         yAxis value: ${this.y}`
      },
   },
}

API references:
https://api.highcharts.com/highcharts/tooltip.formatter

Live demo:
https://stackblitz.com/edit/highcharts-angular-basic-line-frbdhg


Related Query