tooltip: {
trigger: 'axis',
color: '#fff',
backgroundColor: 'rgba(0,0,0,.5)', // 自定义背景颜色
fontSize: 14,
borderColor: 'rgba(255, 255, 255, .16)', // 自定义边框颜色
textStyle: {
color: '#fff', // 自定义文字颜色
fontSize: 14 // 自定义文字大小
},
axisPointer: {
lineStyle: {
color: 'rgba(28, 124, 196, .6)'
}
},
// 自定义内容
formatter: (params) => {
return `
<div>${params[0].name}</div>
<div>${params[0].marker}重量:<span style="color: #09ffd2;font-weight: bold;">${params[0].data}</span> kg</div>
`
},
},
echarts自定义tooltip样式
最新推荐文章于 2024-07-24 23:00:08 发布