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

Method getReferringComponents

src/model/Component.ts:293–311  ·  view source on GitHub ↗

* Notice: always force to input param `useDefault` in case that forget to consider it. * The same behavior as `modelUtil.parseFinder`. * * @param useDefault In many cases like series refer axis and axis refer grid, * If axis index / axis id not specified, use the first tar

(mainType: ComponentMainType, opt: QueryReferringOpt)

Source from the content-addressed store, hash-verified

291 * In other cases like dataZoom refer axis, if not specified, measn no refer.
292 */
293 getReferringComponents(mainType: ComponentMainType, opt: QueryReferringOpt): {
294 // Always be array rather than null/undefined, which is convenient to use.
295 models: ComponentModel[];
296 // Whether target component is specified
297 specified: boolean;
298 } {
299 const indexKey = (mainType + 'Index') as keyof Opt;
300 const idKey = (mainType + 'Id') as keyof Opt;
301
302 return queryReferringComponents(
303 this.ecModel,
304 mainType,
305 {
306 index: this.get(indexKey, true) as unknown as ModelFinderIndexQuery,
307 id: this.get(idKey, true) as unknown as ModelFinderIdQuery
308 },
309 opt
310 );
311 }
312
313 getBoxLayoutParams() {
314 // Consider itself having box layout configs.

Callers 15

getHostGeoModelMethod · 0.80
getInitialDataMethod · 0.80
getTargetMethod · 0.80
setParallelAxisMethod · 0.80
getTargetSeriesModelsMethod · 0.80
referHelper.tsFile · 0.80
findAxisModelsFunction · 0.80
getCoordSysModelMethod · 0.80
_findConvertTargetMethod · 0.80

Calls 2

queryReferringComponentsFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected