【方法1】echarts自身支持legend分页,找了好久,太赞了,注意echarts的图例滚动式v3.7.0版本新加的
http://echarts.baidu.com/examples/editor.html?c=radar2
//折线图
option = {title: {
text: 'Step Line'
},
tooltip: {
trigger: 'axis'
},
legend: {
type: 'scroll',
//y:bottom,
bottom: 10,
data: (function (){
var list = [];
for (var i = 1; i <=10; i++) {
list.push(i + 2000 + '');
}
return list;
})()
},
grid: {
left: '3%',
right: '4%',
bottom: '7%',
containLabel: true
},
toolbox: {
feature: {