var echartsInstance = echarts.init(document.getElementById('DOMid'))
echartsInstance.setOption({
legend:{
type:'plain', //普通图例,默认
'scroll', //可滚动翻页的图例
width:
borderColor:
borderWidth:
left:
top:
orient:'horizontal'/'vertical'//图例列表的布局朝向
align:'auto'/'left'/'right' //图例文本的对齐
padding:
itemGap:10 //图例每项之间的间隔
itemWidth: //图例标记的图形宽度
itemStyle:{
borderColor:
borderWidth:
borderType:'solid'/'dashed'/'dotted'
},
selectedMode:true/false //控制是否可以通过点击图例改变系列的显示状态
'single'/'multiple'
textStyle:{
padding:
width:
overflow:
},
tooltip:{ //图例的tooltip配置,配置项同tooltip。
},
icon:'circle','rect','roundRect','diamond',
'image://http://xxx.xxx/xx.png',
'dataURL',
data:
}
})
echarts中setOption对legend的设置
最新推荐文章于 2025-03-02 21:39:34 发布