修改echarts图标数据显示为0的情况。

This commit is contained in:
weinan2087
2022-09-30 11:58:53 +08:00
parent 9931c14a7e
commit 636b282be8

View File

@@ -339,7 +339,7 @@
tarValue = data[i].value;
}
}
let p =Math.round((tarValue/total)*100)+'%';
let p =total!= 0?Math.round((tarValue/total)*100)+'%':0 +'%';
return ` ${p} ${name}`
}
},