Open jalanmiddleton opened 8 years ago
Something like this could be added to treeMaker.js: // This will traverse the whole tree, leave the leaf node and will give the child with max count of nodes.
getWholeCount = function (obj) { var count = 0; if (obj.children) { obj.children.forEach(function (d) { var tmpCount = getWholeCount(d) if (tmpCount > count) { count = tmpCount } }) } return 1 + count }
// Result could be shown on corner of the window for the opened tree.
It's informative to see how many node constitute the entire tree, this this captures variability within the tree (rather than simply frequency). Put that somewhere?