MCPcopy Index your code
hub / github.com/microsoft/SandDance / stackCenter

Function stackCenter

docs/app/js/sanddance-app.js:130195–130202  ·  view source on GitHub ↗
(group, max, field, y0, y1)

Source from the content-addressed store, hash-verified

130193 }
130194});
130195function stackCenter(group, max, field, y0, y1) {
130196 var last = (max - group.sum) / 2, m = group.length, j = 0, t;
130197 for(; j < m; ++j){
130198 t = group[j];
130199 t[y0] = last;
130200 t[y1] = last += Math.abs(field(t));
130201 }
130202}
130203function stackNormalize(group, max, field, y0, y1) {
130204 var scale = 1 / group.sum, last = 0, m = group.length, j = 0, v = 0, t;
130205 for(; j < m; ++j){

Callers

nothing calls this directly

Calls 1

fieldFunction · 0.70

Tested by

no test coverage detected