tooltip:{ trigger:'axis', formatter:function(a){ var res = ''; var nameList = a; for(var i=0; i<a.length; i++){ if(nameList[i].data != undefined){ res += nameList[i].seriesName+ ':'+nameList[i].data+'%'+'<br>' } } res = res.split('<br>'); return res[0]+'<br>'+res[1]; } }
echarts 折线图的鼠标移动上去小点显示样式修改
tooltip:{
trigger:'axis',
formatter:function(a){
var res = '';
var nameList = a;
for(var i=0; i<a.length; i++){
if(nameList[i].data != undefined){
res += nameList[i].seriesName+ ':'+nameList[i].data+'%'+'<br>'
}
}
res = res.split('<br>');
return res[0]+'<br>'+res[1];
}
}