score:1

Accepted answer

I am aware that it might not be obvious from this article but described methods concerns only the accessibility. https://www.highcharts.com/docs/accessibility/accessibility-module

It doesn't have an impact on the visual output of the chart.

Use the formatter callback instead:

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

dataLabels: {
    enabled: true,
  formatter() {
    return years[this.x]
  }
}

API: https://api.highcharts.com/highcharts/series.line.dataLabels.formatter


Related Query

More Query from same tag