自定义标签:
function(){ var point = this; var series = this.series; var points = this.points;/*获取当前分类下所有点*/ var validPoints = points.filter(function(p) { return p.series.visible && p.visible && !p.isNull && p.options.type=='column';/*获取当前分类下的有效点*/ }); var len = points.length; var vlen = validPoints.length; if (point == validPoints[vlen - 1]) { var value = 0; for (var i = -1; ++i < len;) { if (points[i].series.visible) { value += points[i].getTargetValue();/*获取点的值*/ } } return value;/*返回相加后的值*/ } else { return "";/*返回各个系列的值*/ }}
参考:https://bbs.fanruan.com/wenda/question/60600.html