0

I wanted to move the legend pagination to the right or left side of the legends

Fiddle link

  "legend":{
  "enabled":true,
  "maxHeight":50,
  "itemMarginTop":5,
  "navigation":{
     "activeColor":"#1d4659",
     "animation":true,
     "inactiveColor":"rgba(29, 70, 89, 0.5)"
  }

Sample chart

M_K
  • 5
  • 3

1 Answers1

2

You can wrap scroll method and position the arrows according to your requirements:

(function(H) {
    H.wrap(H.Legend.prototype, 'scroll', function(proceed) {
        proceed.apply(this, Array.prototype.slice.call(arguments, 1));
        this.nav.attr({
            translateY: 10,
            translateX: 390
        });
    });
}(Highcharts));

Live demo: http://jsfiddle.net/BlackLabel/25ahwq1k/

Docs: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts

ppotaczek
  • 36,341
  • 2
  • 14
  • 24