Next, I have a treemap that counts the clicks on the child nodes according to which each user clicks. It happens that, when in large scale of clicks, new values do not appear in the treemap because they are insignificant compared to those that already exist and have a very large amount of clicks. Any idea how to make sure that new objects inserted in the tree can appear and are not covered by the larger number of clicks? Thanks in advance ! : D
code where tree structuring occurs
function accumulate(d) {
return (d._children = d.values)
? d.value = d.values.reduce(function(p, v) { return p + accumulate(v); }, 0)
: d.value = d.value;
}
function layout(d) {
if (d._children) {
treemap.nodes({_children: d._children});
d._children.forEach(function(c) {
c.x = d.x + c.x * d.dx;
c.y = d.y + c.y * d.dy;
c.dx *= d.dx;
c.dy *= d.dy;
c.parent = d;
layout(c);
});
}
}