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

Method showLoading

src/core/echarts.ts:1519–1543  ·  view source on GitHub ↗
(name?: string | object, cfg?: object)

Source from the content-addressed store, hash-verified

1517 showLoading(cfg?: object): void;
1518 showLoading(name?: string, cfg?: object): void;
1519 showLoading(name?: string | object, cfg?: object): void {
1520 if (this._disposed) {
1521 disposedWarning(this.id);
1522 return;
1523 }
1524
1525 if (isObject(name)) {
1526 cfg = name as object;
1527 name = '';
1528 }
1529 name = name || 'default';
1530
1531 this.hideLoading();
1532 if (!loadingEffects[name]) {
1533 if (__DEV__) {
1534 warn('Loading effects ' + name + ' not exists.');
1535 }
1536 return;
1537 }
1538 const el = loadingEffects[name](this._api, cfg);
1539 const zr = this._zr;
1540 this._loadingFX = el;
1541
1542 zr.add(el);
1543 }
1544
1545 /**
1546 * Hide loading effect

Callers

nothing calls this directly

Calls 5

hideLoadingMethod · 0.95
warnFunction · 0.90
disposedWarningFunction · 0.85
isObjectFunction · 0.50
addMethod · 0.45

Tested by

no test coverage detected