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

Function getDimCount

src/data/helper/createDimensions.ts:374–395  ·  view source on GitHub ↗
(
    source: Source,
    sysDims: CoordDimensionDefinitionLoose[],
    dimsDef: DimensionDefinitionLoose[],
    optDimCount?: number
)

Source from the content-addressed store, hash-verified

372// on other dimensions besides coordSys needed.
373// So, dims that is not used by system, should be shared in data store?
374function getDimCount(
375 source: Source,
376 sysDims: CoordDimensionDefinitionLoose[],
377 dimsDef: DimensionDefinitionLoose[],
378 optDimCount?: number
379): number {
380 // Note that the result dimCount should not small than columns count
381 // of data, otherwise `dataDimNameMap` checking will be incorrect.
382 let dimCount = Math.max(
383 source.dimensionsDetectedCount || 1,
384 sysDims.length,
385 dimsDef.length,
386 optDimCount || 0
387 );
388 each(sysDims, function (sysDimItem) {
389 let sysDimItemDimsDef;
390 if (isObject(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) {
391 dimCount = Math.max(dimCount, sysDimItemDimsDef.length);
392 }
393 });
394 return dimCount;
395}
396
397function genCoordDimName(
398 name: DimensionName,

Callers 1

prepareSeriesDataSchemaFunction · 0.85

Calls 2

eachFunction · 0.50
isObjectFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…