MCPcopy
hub / github.com/chartjs/Chart.js / updateMinAndPrev

Function updateMinAndPrev

src/controllers/controller.bar.js:29–39  ·  src/controllers/controller.bar.js::updateMinAndPrev
()

Source from the content-addressed store, hash-verified

27 let min = scale._length;
28 let i, ilen, curr, prev;
29 const updateMinAndPrev = () => {
30 if (curr === 32767 || curr === -32768) {
31 class="cm">// Ignore truncated pixels
32 return;
33 }
34 if (defined(prev)) {
35 class="cm">// curr - prev === 0 is ignored
36 min = Math.min(min, Math.abs(curr - prev) || min);
37 }
38 prev = curr;
39 };
40
41 for (i = 0, ilen = values.length; i < ilen; ++i) {
42 curr = scale.getPixelForValue(values[i]);

Callers 1

computeMinSampleSizeFunction · 0.85

Calls 1

definedFunction · 0.85

Tested by

no test coverage detected