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

Method getSelectedDataIndices

src/model/Series.ts:638–652  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

636 }
637
638 getSelectedDataIndices(): number[] {
639 if (this.option.selectedMap === 'all') {
640 return [].slice.call(this.getData().getIndices());
641 }
642 const selectedDataIndicesMap = this._selectedDataIndicesMap;
643 const nameOrIds = zrUtil.keys(selectedDataIndicesMap);
644 const dataIndices = [];
645 for (let i = 0; i < nameOrIds.length; i++) {
646 const dataIndex = selectedDataIndicesMap[nameOrIds[i]];
647 if (dataIndex >= 0) {
648 dataIndices.push(dataIndex);
649 }
650 }
651 return dataIndices;
652 }
653
654 isSelected(dataIndex: number, dataType?: SeriesDataType): boolean {
655 const selectedMap = this.option.selectedMap;

Callers 1

getAllSelectedIndicesFunction · 0.80

Calls 2

getDataMethod · 0.95
getIndicesMethod · 0.45

Tested by

no test coverage detected