MCPcopy Create free account
hub / github.com/plotly/plotly.js / makeIncrements

Function makeIncrements

src/traces/histogram2d/calc.js:176–186  ·  view source on GitHub ↗
(len, bins, dv, nonuniform)

Source from the content-addressed store, hash-verified

174};
175
176function makeIncrements(len, bins, dv, nonuniform) {
177 var out = new Array(len);
178 var i;
179 if(nonuniform) {
180 for(i = 0; i < len; i++) out[i] = 1 / (bins[i + 1] - bins[i]);
181 } else {
182 var inc = 1 / dv;
183 for(i = 0; i < len; i++) out[i] = inc;
184 }
185 return out;
186}
187
188function binsToCalc(r2c, bins) {
189 return {

Callers 1

calc.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…