score:0

as of 5 years later, do this:

legend: {
    enabled: true,
    labelFormatter: function() {
    let legendName = this.series.chart.axes[0].categories[this.x];
    return legendName;}}

score:5

You can do this with tooltip.formatter and legend.labelFormatter and accessing the highchart options.

For the tooltip text:

tooltip: {
  formatter: function() {
    var sliceIndex = this.point.index;
    var sliceName = this.series.chart.axes[0].categories[sliceIndex];
    return 'The value for <b>' + sliceName +
      '</b> is <b>' + this.y + '</b>';
  }
},

And for the legend:

legend: {
  enabled: true,
  labelFormatter: function() {
    var legendIndex = this.index;
    var legendName = this.series.chart.axes[0].categories[legendIndex];

    return legendName;
  }
},

Live demo.


Related Query

More Query from same tag