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

Method getTarget

src/component/thumbnail/ThumbnailModel.ts:132–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130 }
131
132 getTarget(): {
133 baseMapProvider: ComponentModel | NullUndefined
134 // May extend.
135 } {
136 if (this._target) {
137 return this._target;
138 }
139
140 // Find by `seriesId`/`seriesIndex`.
141 let series = this.getReferringComponents('series', {
142 useDefault: false, enableAll: false, enableNone: false
143 }).models[0];
144 if (series) {
145 if (series.subType !== 'graph') {
146 series = null;
147 if (__DEV__) {
148 error(`series.${series.subType} is not supported in thumbnail.`, true);
149 }
150 }
151 }
152 else {
153 // If no xxxId and xxxIndex specified, find the first series.graph. If other components,
154 // such as geo, is supported in future, the default stretagy may be extended.
155 series = this.ecModel.queryComponents({mainType: 'series', subType: 'graph'})[0];
156 }
157
158 this._target = {
159 baseMapProvider: series
160 };
161
162 return this._target;
163 }
164
165}

Callers 4

_updateBridgeMethod · 0.95
_onPanMethod · 0.80
_onZoomMethod · 0.80
_isEnabledMethod · 0.80

Calls 3

errorFunction · 0.90
queryComponentsMethod · 0.80

Tested by

no test coverage detected