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

Method filterSelf

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

Source from the content-addressed store, hash-verified

920 filterSelf<Ctx>(dims: [DimensionLoose, DimensionLoose], cb: FilterCb2<Ctx>, ctx?: Ctx): this;
921 filterSelf<Ctx>(dims: ItrParamDims, cb: FilterCb<Ctx>, ctx?: Ctx): this;
922 filterSelf<Ctx>(
923 dims: ItrParamDims | FilterCb<Ctx>,
924 cb: FilterCb<Ctx> | Ctx,
925 ctx?: Ctx
926 ): SeriesData {
927 'use strict';
928
929 if (zrUtil.isFunction(dims)) {
930 ctx = cb as Ctx;
931 cb = dims;
932 dims = [];
933 }
934
935 // ctxCompat just for compat echarts3
936 const fCtx = (ctx || this) as CtxOrList<Ctx>;
937
938 const dimIndices = map(normalizeDimensions(dims), this._getStoreDimIndex, this);
939
940 this._store = this._store.filter(dimIndices, (fCtx
941 ? zrUtil.bind(cb as any, fCtx as any)
942 : cb) as any
943 );
944
945 return this;
946 }
947
948 /**
949 * Select data in range. (For optimization of filter)

Callers 6

SeriesData.test.tsFile · 0.80
categoryFilterFunction · 0.80
filterDataMethod · 0.80
updateMethod · 0.80
negativeDataFilterFunction · 0.80
dataFilterFunction · 0.80

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected