function sumLabel(){ const point = this; const points = point.points; const validPoints = points.filter((point) => point.isVisible()); if(point == validPoints) { let value = 0; for(let i = 0; i < validPoints.length; i++) { value += validPoints.value; } return value.toFixed(0); // 保留一位小数 } else { return ""; } }