MCPcopy Index your code
hub / github.com/apache/echarts / makeMap

Function makeMap

src/util/model.ts:660–680  ·  view source on GitHub ↗
(sourceBatch: BatchItem[], map: InnerMap, otherMap?: InnerMap)

Source from the content-addressed store, hash-verified

658 return [mapToArray(mapA), mapToArray(mapB)];
659
660 function makeMap(sourceBatch: BatchItem[], map: InnerMap, otherMap?: InnerMap): void {
661 for (let i = 0, len = sourceBatch.length; i < len; i++) {
662 const seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);
663 if (seriesId == null) {
664 return;
665 }
666 const dataIndices = normalizeToArray(sourceBatch[i].dataIndex);
667 const otherDataIndices = otherMap && otherMap[seriesId];
668
669 for (let j = 0, lenj = dataIndices.length; j < lenj; j++) {
670 const dataIndex = dataIndices[j];
671
672 if (otherDataIndices && otherDataIndices[dataIndex]) {
673 otherDataIndices[dataIndex] = null;
674 }
675 else {
676 (map[seriesId] || (map[seriesId] = {}))[dataIndex] = 1;
677 }
678 }
679 }
680 }
681
682 function mapToArray(map: Dictionary<any>, isData?: boolean): any[] {
683 const result = [];

Callers 1

compressBatchesFunction · 0.85

Calls 2

convertOptionIdNameFunction · 0.85
normalizeToArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…