用echarts的时候会出现图例过多遮挡问题。
1
设置图例太长分页
const option = {
tooltip: {
confine: true,
trigger: 'axis'
},
legend: [ {
type: 'scroll', // 关键
orient: 'horizontal', // 横向显示 vertical纵向显示
data: this.dataList.nameset
}],
xAxis: {
axisLabel: {
textStyle: '#999'
},
axisLine: { lineStyle: { width: 1 }, show: true },
boundaryGap: false,
data: this.dataList.categories,
type: 'category'
},
yAxis: {
type: 'value'
},
series: this.dataList.series
}