用这个自定义js语句
function sumLabel(){
const point = this;
const points = point.points;
const validPoints = points.filter( (point) => point.isVisible() );
if(point == validPoints[validPoints.length - 1]){
let value = 0;
for(let i = 0; i < validPoints.length; i++){
value += validPoints[i].value;
}
return this.value+" 合计"+value;
} else {
return this.value;
}
}
==========
效果