Function
stackNormalize
(group, max, field, y0, y1)
Source from the content-addressed store, hash-verified
| 111317 | } |
| 111318 | |
| 111319 | function stackNormalize(group, max, field, y0, y1) { |
| 111320 | var scale = 1 / group.sum, |
| 111321 | last = 0, |
| 111322 | m = group.length, |
| 111323 | j = 0, |
| 111324 | v = 0, |
| 111325 | t; |
| 111326 | |
| 111327 | for (; j < m; ++j) { |
| 111328 | t = group[j]; |
| 111329 | t[y0] = last; |
| 111330 | t[y1] = last = scale * (v += Math.abs(field(t))); |
| 111331 | } |
| 111332 | } |
| 111333 | |
| 111334 | function stackZero(group, max, field, y0, y1) { |
| 111335 | var lastPos = 0, |
Callers
nothing calls this directly
Tested by
no test coverage detected