MCPcopy
hub / github.com/apache/echarts / eachKeyOnAxis

Function eachKeyOnAxis

src/coord/axisStatistics.ts:319–335  ·  view source on GitHub ↗
(
    axis: Axis,
    cb: (axisStatKey: AxisStatKey) => void
)

Source from the content-addressed store, hash-verified

317 * by the given axis.
318 */
319export 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.

Callers 2

Calls 6

getCachePerECFullUpdateFunction · 0.90
getAxisStatPerKeyPerAxisFunction · 0.85
eachFunction · 0.50
assertFunction · 0.50
cbFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…