MCPcopy Create free account
hub / github.com/idank/explainshell / d3_scale_linearTickFormat

Function d3_scale_linearTickFormat

explainshell/web/static/js/d3.v3.js:6477–6482  ·  view source on GitHub ↗
(domain, m, format)

Source from the content-addressed store, hash-verified

6475 return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
6476 }
6477 function d3_scale_linearTickFormat(domain, m, format) {
6478 var precision = -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01);
6479 return d3.format(format ? format.replace(d3_format_re, function(a, b, c, d, e, f, g, h, i, j) {
6480 return [ b, c, d, e, f, g, h, i || "." + (precision - (j === "%") * 2), j ].join("");
6481 }) : ",." + precision + "f");
6482 }
6483 d3.scale.log = function() {
6484 return d3_scale_log(d3.scale.linear().domain([ 0, Math.LN10 ]), 10, d3_scale_logp, d3_scale_powp);
6485 };

Callers 3

d3_scale_linearFunction · 0.85
d3_scale_powFunction · 0.85
d3_scale_identityFunction · 0.85

Calls 1

d3_scale_linearTickRangeFunction · 0.85

Tested by

no test coverage detected