我想将图例分页移动到图例的右侧或左侧
"legend":{
"enabled":true,
"maxHeight":50,
"itemMarginTop":5,
"navigation":{
"activeColor":"#1d4659",
"animation":true,
"inactiveColor":"rgba(29, 70, 89, 0.5)"
}
您可以包装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