流量统计数值保留两位小数

This commit is contained in:
zhanghongqing
2018-12-12 15:33:27 +08:00
parent a3f2943e5c
commit f5b0a0d4d0
4 changed files with 11 additions and 9 deletions

View File

@@ -133,7 +133,7 @@
mouseOver: function(e) { // 鼠标滑过时动态更新标题
// 标题更新函数API 地址https://api.hcharts.cn/highcharts#Chart.setTitle
chart.setTitle({
text:e.target.name.length>10? this.percentage.toFixed(1)+"%<br><span>"+e.target.name.substring(0,10)+"...</span>":this.percentage.toFixed(1)+"%<br><span>"+e.target.name.substring(0,10)+"</span>",
text:e.target.name.length>10? this.percentage.toFixed(2)+"%<br><span>"+e.target.name.substring(0,10)+"...</span>":this.percentage.toFixed(2)+"%<br><span>"+e.target.name.substring(0,10)+"</span>",
floating:true,
y:120,
style: {//设置字体颜色
@@ -375,7 +375,7 @@
// inoctetsNum=inoctetsNumG;
// };
inoctetsNum=inoctetsNumG;
inoctetsNum=inoctetsNum.toFixed(5)
inoctetsNum=inoctetsNum.toFixed(2)
return inoctetsNum;
}
function changeUnit(inoctetsNum){