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

Function d3_formatPrefix

explainshell/web/static/js/d3.v3.js:1871–1881  ·  view source on GitHub ↗
(d, i)

Source from the content-addressed store, hash-verified

1869 return d3_formatPrefixes[8 + i / 3];
1870 };
1871 function d3_formatPrefix(d, i) {
1872 var k = Math.pow(10, Math.abs(8 - i) * 3);
1873 return {
1874 scale: i > 8 ? function(d) {
1875 return d / k;
1876 } : function(d) {
1877 return d * k;
1878 },
1879 symbol: d
1880 };
1881 }
1882 d3.round = function(x, n) {
1883 return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
1884 };

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected