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

Method mapArray

src/data/SeriesData.ts:978–999  ·  view source on GitHub ↗
(
        dims: ItrParamDims | MapArrayCb<Ctx>,
        cb: MapArrayCb<Ctx> | Ctx,
        ctx?: Ctx
    )

Source from the content-addressed store, hash-verified

976 mapArray<Ctx, Cb extends MapArrayCb<Ctx>>(dims: ItrParamDims, cb: Cb, ctx?: Ctx, ctxCompat?: Ctx): ReturnType<Cb>[];
977 /* eslint-enable max-len */
978 mapArray<Ctx>(
979 dims: ItrParamDims | MapArrayCb<Ctx>,
980 cb: MapArrayCb<Ctx> | Ctx,
981 ctx?: Ctx
982 ): unknown[] {
983 'use strict';
984
985 if (zrUtil.isFunction(dims)) {
986 ctx = cb as Ctx;
987 cb = dims;
988 dims = [];
989 }
990
991 // ctxCompat just for compat echarts3
992 ctx = (ctx || this) as Ctx;
993
994 const result: unknown[] = [];
995 this.each(dims, function () {
996 result.push(cb && (cb as MapArrayCb<Ctx>).apply(this, arguments));
997 }, ctx);
998 return result;
999 }
1000
1001 /**
1002 * Data mapping to a new List with given dimensions

Callers 10

_updateCategoriesDataMethod · 0.95
SeriesData.test.tsFile · 0.80
_renderOnGeoMethod · 0.80
createViewCoordSysFunction · 0.80
graphForceLayoutFunction · 0.80
categoryFilterFunction · 0.80
getSortedIndicesFunction · 0.80
_createAxisMethod · 0.80
getAllNamesMethod · 0.80

Calls 1

eachMethod · 0.95

Tested by

no test coverage detected