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

Method getDimensionIndex

src/data/SeriesData.ts:397–413  ·  view source on GitHub ↗

* Get dimension index in data store. Return -1 if not found. * Can be used to index value from getRawValue.

(dim: DimensionLoose)

Source from the content-addressed store, hash-verified

395 * Can be used to index value from getRawValue.
396 */
397 getDimensionIndex(dim: DimensionLoose): DimensionIndex {
398 const dimIdx = this._recognizeDimIndex(dim);
399 if (dimIdx != null) {
400 return dimIdx;
401 }
402
403 if (dim == null) {
404 return -1;
405 }
406
407 const dimInfo = this._getDimInfo(dim as DimensionName);
408 return dimInfo
409 ? dimInfo.storeDimIndex
410 : this._dimOmitted
411 ? this._schema.getSourceDimensionIndex(dim as DimensionName)
412 : -1;
413 }
414
415 /**
416 * The meanings of the input parameter `dim`:

Callers 15

_getStoreDimIndexMethod · 0.95
valueFunction · 0.80
ordinalRawValueFunction · 0.80
wrapEncodeDefFunction · 0.80
renderMethod · 0.80
createProgressiveLayoutFunction · 0.80
pointsLayoutFunction · 0.80
getDataDimensionIndexMethod · 0.80
filterDataMethod · 0.80
indicesOfNearestMethod · 0.80

Calls 2

_recognizeDimIndexMethod · 0.95

Tested by

no test coverage detected