MCPcopy
hub / github.com/jipegit/OSXAuditor / scale

Function scale

d3-3.2.8/d3.js:6493–6499  ·  view source on GitHub ↗
(children, k)

Source from the content-addressed store, hash-verified

6491 d3.layout.treemap = function() {
6492 var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
6493 function scale(children, k) {
6494 var i = -1, n = children.length, child, area;
6495 while (++i < n) {
6496 area = (child = children[i]).value * (k < 0 ? 0 : k);
6497 child.area = isNaN(area) || area <= 0 ? 0 : area;
6498 }
6499 }
6500 function squarify(node) {
6501 var children = node.children;
6502 if (children && children.length) {

Callers 6

azimuthalFunction · 0.85
squarifyFunction · 0.85
stickifyFunction · 0.85
treemapFunction · 0.85
scale-test.jsFile · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected