实现效果:
![在这里插入图片描述](https://img-blog.csdnimg.cn/f16fad5d7cd54bd79fcb8a6ade3f8a69.png)
echart配置代码:
const HisSeries = [[], [], [], [], [], 0, 0]
tooltip: {
trigger: 'axis',
show: true,
formatter: function(v) {
console.log(v[1])
const temp = '<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#1398FF;"></span>'
return v[0].name + '<br>' + temp + +v[0].data + ' ' + v[0].seriesName + '<br>' + v[1].marker + v[1].data + ' ' + v[1].seriesName
}
},
grid: {
top: '12%',
left: '2%',
right: '2%',
bottom: '6%',
containLabel: true
},
xAxis: [
{
type: 'category',
boundaryGap: tru