🍓 作者主页:💖仙女不下凡💖
🍓 前言介绍:以下👇内容是我个人对于该技术的总结,如有不足与错误敬请指正!
🍓 欢迎点赞👍 收藏⭐ 留言📝 相关账号会持续发布关于文章Echart的相关文章欢迎持续关注!
✨什么是legend图例组件,如下图:
- itemStyle:图形样式
- lineStyle:图例图形中线的样式
- textStyle:
- tooltip:图例的tooltip配置,配置项同tooltip。默认不显示
- data:图例数据数组,若data没有被指定,会自动从当前系列中获取。多数系列会取自series.name或者series.encode的 seriesName所指定的维度
💕 其中也会含有很多属性,具体使用请参考一下内容
legend: {
type: 'plain',
show: true,
zlevel: 2,
z: 2,
left: '',
top: '',
right: '',
bottom: '',
width: 'auto',
height: 'auto',
orient: 'horizontal',
align: 'auto',
padding: 5,
itemGap: 10,
itemWidth: 25,
itemHeight: 14,
itemStyle: {
color: '', /颜色,参考下面的文章/
borderColor: '',
borderWidth: auto,
borderType: solid,
borderDashOffset: 0,
borderCap: round
},
lineStyle: {
color: '', /颜色,参考下面的文章/
width: auto,
type: solid,
dashOffset: 0,
cap: round,
join: auto,
miterLimit: 10,
shadowBlur: 10,
shadowColor: '',
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: auto
},
symbolRotate: inherit,
formatter: 'Legend {name}',
selectedMode: true,
inactiveColor: '#ccc',
inactiveBorderColor: '#ccc',
inactiveBorderWidth: 'auto',
selected: {
'系列1': true,
'系列2': false
},
textStyle: {
color: #333,
fontStyle: '',
fontWeight: '',
fontFamily: '',
fontSize: 12,
lineHeight: 16,
backgroundColor: '',
borderColor: '',
borderWidth: 0,
borderType: 'solid',
borderDashOffset: 0,
borderRadius: 0,
padding: 0,
shadowColor: 'transparent',
shadowBlur: 0,
shadowOffsetX: 0,
shadowOffsetY: 0,
width: 0,
height: 0,
textBorderColor: '',
textBorderWidth: '',
textBorderType: 'solid',
textBorderDashOffset: 0,
textShadowColor: 'transparent',
textShadowBlur: 0,
textShadowOffsetX: 0,
textShadowOffsetY: 0,
overflow: 'none',
ellipsis: '',
rich: {},
},
tooltip: {
show: true
},
icon: '',
data: [{
name: '',
icon: 'circle',
itemStyle: {
color: 'red',
borderColor: ''
borderWidth: auto,
borderType: '',
borderDashOffset: 0,
borderCap: inherit,
borderJoin: inherit,
borderMiterLimit: inherit,
shadowBlur: 0,
shadowColor: '',
shadowOffsetX: 0,
shadowOffsetY: 0,
opacity: inherit,
decal: inherit
},
lineStyle: {},
symbolRotate: 'inherit',
textStyle: {}
}],
backgroundColor: 'transparent',
borderColor: '#ccc',
borderWidth: 1,
borderRadius: 0,
shadowBlur: 10,
shadowColor: '',
shadowOffsetX: 0,
shadowOffsetY: 0,
scrollDataIndex: 0,
pageButtonItemGap: 5,
pageButtonGap: '',
pageButtonPosition: 'end',
pageFormatter: '{current}/{total}',
pageIcons: {
horizontal: '',
vertical: ''
},
pageIconColor: '#2f4554',
pageIconInactiveColor: '#aaa',
pageIconSize: 15,
pageTextStyle: {},
animation: true,
animationDurationUpdate: 800,
emphasis: {
selectorLabel: {}
},
selector: false,
selectorLabel: {},
selectorPosition: 'auto',
selectorItemGap: 7,
selectorButtonGap: 10
}
👉推荐相关文章:Echart图表 之 基本使用及配置项
👉推荐相关文章:Echart图表 之 title配置项大全
👉推荐相关文章:Echart图表 之 颜色color配置项大全
👉推荐相关文章:Echart图表 之 X轴(xAxis)与 Y轴(yAxis)配置项大全
👉推荐相关文章:Echart图表 之 tooltip提示框组件配置项大全
👉推荐相关文章:Echart图表 之 toolbox工具栏组件配置项大全
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)