【问题标题】:How can i align the highchart legend pagination to right or left side of the legends?如何将 highchart 图例分页对齐到图例的右侧或左侧?
【发布时间】:2019-11-21 05:47:45
【问题描述】:

我想将图例分页移动到图例的右侧或左侧

Fiddle link

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

Sample chart

【问题讨论】:

    标签: highcharts highcharts-ng angular2-highcharts


    【解决方案1】:

    您可以包装scroll 方法并根据您的要求定位箭头:

    (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));
    

    现场演示: http://jsfiddle.net/BlackLabel/25ahwq1k/

    文档: https://www.highcharts.com/docs/extending-highcharts/extending-highcharts

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-29
      • 2019-12-28
      • 1970-01-01
      • 2016-07-11
      • 1970-01-01
      • 2015-07-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多