(
axis: Axis,
cb: (axisStatKey: AxisStatKey) => void
)
| 317 | * by the given axis. |
| 318 | */ |
| 319 | export function eachKeyOnAxis( |
| 320 | axis: Axis, |
| 321 | cb: (axisStatKey: AxisStatKey) => void |
| 322 | ): void { |
| 323 | if (__DEV__) { |
| 324 | validateInputAxis(axis); |
| 325 | } |
| 326 | const model = axis.model; |
| 327 | const keysByAxisModelUid = ecModelCacheFullUpdateInner(getCachePerECFullUpdate(model.ecModel)).keys; |
| 328 | keysByAxisModelUid && each(keysByAxisModelUid.get(model.uid), function (axisStatKey) { |
| 329 | if (__DEV__) { |
| 330 | const stat = getAxisStatPerKeyPerAxis(axis, axisStatKey); |
| 331 | assert(stat && stat.sers.length > 0); // This is to avoid irrelevant `AxisStatKey` to enter `cb`. |
| 332 | } |
| 333 | cb(axisStatKey); |
| 334 | }); |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * NOTICE: this processor may be omitted - it is registered only if required. |
no test coverage detected
searching dependent graphs…