(sourceBatch: BatchItem[], map: InnerMap, otherMap?: InnerMap)
| 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 = []; |
no test coverage detected
searching dependent graphs…