使用高图表js乘以位置图例,我有2个图例第1个图例左对齐第2个图例右对齐,目前我的视图是(点击链接并查看): {{3 } 或者在下面看我的代码,如何实现这个?
yAxis: [
{
labels: {
formatter: function() {
return "$"+ this.value;
}
},
title: {
text: ''
},
opposite: false
},
{
labels: {
formatter: function() {
return this.value + "k";
}
},
title: {
text: ''
},
opposite: true
}
],
legend:{
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
floating: true,
symbolHeight: 50,
itemMarginTop: 5,
itemMarginBottom: 5,
backgroundColor: '#ffffff'
},
答案 0 :(得分:0)
以下是拆分图例的示例:http://jsfiddle.net/kkulig/6gzp6tqu/
通过包装Highcharts Legend.prototype.getAllItems
和Chart.prototype.render
核心功能来完成。您可以在此处找到有关包装的更多信息( 包装原型函数 部分):https://www.highcharts.com/docs/extending-highcharts/extending-highcharts