MCPcopy Create free account
hub / github.com/breck7/scroll / treemapDice

Function treemapDice

external/.d3.js:13616–13627  ·  view source on GitHub ↗
(parent, x0, y0, x1, y1)

Source from the content-addressed store, hash-verified

13614}
13615
13616function treemapDice(parent, x0, y0, x1, y1) {
13617 var nodes = parent.children,
13618 node,
13619 i = -1,
13620 n = nodes.length,
13621 k = parent.value && (x1 - x0) / parent.value;
13622
13623 while (++i < n) {
13624 node = nodes[i], node.y0 = y0, node.y1 = y1;
13625 node.x0 = x0, node.x1 = x0 += node.value * k;
13626 }
13627}
13628
13629function partition() {
13630 var dx = 1,

Callers 3

positionNodeFunction · 0.85
squarifyRatioFunction · 0.85
resquarifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected