function(){
const point = this;
const points = this.points;
const len = points.length;
let content = this.category+'<br />';
let sum = 0;
for (let i = 0; i < len; i++) { //同一分类下所有系列均求和
if (point.isVisible()) {
content += points[i].seriesName+':'+points[i].value+'<br />';
sum += points[i].value;
}
}
content += '总计:'+Math.round(sum * 100) / 100
return content;
}
其中points[i].seriesName可以指定过滤你需要的系列名称 |