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

Function getLastIndexInStack

src/core/core.datasetController.js:141–150  ·  view source on GitHub ↗
(stack, vScale, positive, type)

Source from the content-addressed store, hash-verified

139}
140
141function getLastIndexInStack(stack, vScale, positive, type) {
142 for (const meta of vScale.getMatchingVisibleMetas(type).reverse()) {
143 const value = stack[meta.index];
144 if ((positive && value > 0) || (!positive && value < 0)) {
145 return meta.index;
146 }
147 }
148
149 return null;
150}
151
152function updateStacks(controller, parsed) {
153 const {chart, _cachedMeta: meta} = controller;

Callers 1

updateStacksFunction · 0.85

Calls 1

Tested by

no test coverage detected