需要将值显示格式为保留整数,为#,##0 function() { var points = this.points; var a = points[1].value; //实际值 var b = points[0].value; //计划值 if (this.seriesName == "实际") { return "<span style='color:#1C1C1C;font-size:12px;font-weight:bold'>实际 " + a + " " + ((a / b) * 100).toFixed(2) + "%" + "</span>"; } else { return "<span style='color:#1C1C1C;font-size:12px;font-weight:bold'>计划 " + b+ "</span>"; } } |