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

Method _initSelectedMapFromData

src/model/Series.ts:721–741  ·  view source on GitHub ↗
(data: SeriesData)

Source from the content-addressed store, hash-verified

719 }
720
721 private _initSelectedMapFromData(data: SeriesData) {
722 // Ignore select info in data if selectedMap exists.
723 // NOTE It's only for legacy usage. edge data is not supported.
724 if (this.option.selectedMap) {
725 return;
726 }
727
728 const dataIndices: number[] = [];
729 if (data.hasItemOption) {
730 data.each(function (idx) {
731 const rawItem = data.getRawDataItem(idx);
732 if (rawItem && (rawItem as OptionDataItemObject<unknown>).selected) {
733 dataIndices.push(idx);
734 }
735 });
736 }
737
738 if (dataIndices.length > 0) {
739 this._innerSelect(data, dataIndices);
740 }
741 }
742
743 // /**
744 // * @see {module:echarts/stream/Scheduler}

Callers 2

initMethod · 0.95
mergeOptionMethod · 0.95

Calls 3

_innerSelectMethod · 0.95
eachMethod · 0.45
getRawDataItemMethod · 0.45

Tested by

no test coverage detected