ehcarts自定义tooltips显示内容
tooltip: {
trigger: 'axis',
formatter: function (params) {
var result = params[0].name + '<br>';
params.forEach(function (item) {
if (item.value) {
result +=
item.marker +
' ' +
item.seriesName +
' : ' +
formatNumberFunc(Number(item.value), false) +
'元</br>';
} else {
result += item.marker + ' ' + item.seriesName + ' : - </br>';
}
});
return result;
},
},