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

Method rawIndexOf

src/data/SeriesData.ts:862–874  ·  view source on GitHub ↗

* Only support the dimension which inverted index created. * Do not support other cases until required. * @param dim concrete dim * @param value ordinal index * @return rawIndex

(dim: SeriesDimensionName, value: OrdinalNumber)

Source from the content-addressed store, hash-verified

860 * @return rawIndex
861 */
862 rawIndexOf(dim: SeriesDimensionName, value: OrdinalNumber): number {
863 const invertedIndices = dim && this._invertedIndicesMap[dim];
864 if (__DEV__) {
865 if (!invertedIndices) {
866 throw new Error('Do not supported yet');
867 }
868 }
869 const rawIndex = invertedIndices && invertedIndices[value];
870 if (rawIndex == null || isNaN(rawIndex)) {
871 return INDEX_NOT_FOUND;
872 }
873 return rawIndex;
874 }
875
876 /**
877 * Data iteration

Callers 2

calculateStackFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected