echarts legend图例分页
程序员文章站
2022-03-20 18:04:11
...
效果:
方法:
echarts的legend里设置type: 'scroll',且一定要有data字段,且data与series里的data一一对应
代码:
this.myChart.setOption({
color: ['#404C7E', '#4C4FC9', '#8D58E1', '#F05B72', '#FBCE38', '#1A8CFF', '#00B377'],
legend: {
type: 'scroll',
itemGap: 20,
// itemHeight: 15,
padding: 0,
x: 0,
y: 'center',
// bottom: -20,
orient: 'vertical',
data: this.ClassifyData
},
series: [
{
...
data: this.ClassifyData
}
]
})
参考:
https://blog.csdn.net/yl640007010/article/details/79731604
上一篇: JAVA基础学习日记-----持续更新
下一篇: matplotlib 图例