ehcarts tooltip 自定义展示. 展示小图例
效果
代码
tooltip: {
show: true,
trigger: 'axis',
formatter: function (params) {
let axisValueLabel = params[0].axisValueLabel
let sumVal = 0;
let src = axisValueLabel + '<br>';
for (let x in params) {
sumVal += Number(params[x].value)
src += params[x].marker + params[x].seriesName + ": " + params[x].value + '<br>';
}
return src
},
}