UNPKG

@antv/f2

Version:

Charts for mobile visualization.

9 lines 261 B
export default function (value) { return this.eachAfter(function (node) { var sum = +value(node.data) || 0, children = node.children, i = children && children.length; while (--i >= 0) sum += children[i].value; node.value = sum; }); }