legend: {
icon: 'circle',
itemWidth: 10,
itemHeight: 10,
itemGap: 15, // 每一个item之间的间距
width: '400',
top: 'center',
left: '62%',
orient: 'vertical',
formatter: (name, value) => {
let dats = name.split('-');
return `{name|${dats[0]}}\t\t\t{percent|${dats[1]}}`
},
textStyle: {
color: '#fff',
rich: {
name: {
fontSize: 12,
color: '#7f99b7',
padding: [0, 0, 0, 0],
width: 40
},
percent: {
fontSize: 14,
fontWeight: 400,
color: "white",
padding: [0, 0, 0, 0],
},
}
}
},
echarts 设置legend的样式
最新推荐文章于 2024-05-21 09:10:56 发布