(stack, vScale, positive, type)
| 139 | } |
| 140 | |
| 141 | function 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 | |
| 152 | function updateStacks(controller, parsed) { |
| 153 | const {chart, _cachedMeta: meta} = controller; |
no test coverage detected