score:1

Accepted answer

In this case, you need to wrap Highcharts.PlotLineOrBand.prototype render function. Check the following code and demo:

(function(H) {
   H.wrap(H.PlotLineOrBand.prototype, 'render', function(proceed) {
     proceed.apply(this, Array.prototype.slice.call(arguments, ));

     const label = this.label;

     if (label) {
       label.css({
         lineHeight: label.alignOptions.style.lineHeight
       })
     }

   });
 }(Highcharts));

More about Extending Highcharts: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts

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


Related Articles