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

Method processLabelsOverall

src/label/LabelManager.ts:474–499  ·  view source on GitHub ↗

* Process all labels. Not only labels with layoutOption.

()

Source from the content-addressed store, hash-verified

472 * Process all labels. Not only labels with layoutOption.
473 */
474 processLabelsOverall() {
475 each(this._chartViewList, (chartView) => {
476 const seriesModel = chartView.__model;
477 const ignoreLabelLineUpdate = chartView.ignoreLabelLineUpdate;
478 const animationEnabled = seriesModel.isAnimationEnabled();
479
480 chartView.group.traverse((child) => {
481 if (child.ignore && !(child as ECElement).forceLabelAnimation) {
482 return true; // Stop traverse descendants.
483 }
484
485 let needsUpdateLabelLine = !ignoreLabelLineUpdate;
486 const label = child.getTextContent();
487 if (!needsUpdateLabelLine && label) {
488 needsUpdateLabelLine = labelLayoutInnerStore(label).needsUpdateLabelLine;
489 }
490 if (needsUpdateLabelLine) {
491 this._updateLabelLine(child, seriesModel);
492 }
493
494 if (animationEnabled) {
495 this._animateLabels(child, seriesModel);
496 }
497 });
498 });
499 }
500
501 private _updateLabelLine(el: Element, seriesModel: SeriesModel) {
502 // Only support label being hosted on graphic elements.

Callers 1

installLabelLayoutFunction · 0.80

Calls 4

_updateLabelLineMethod · 0.95
_animateLabelsMethod · 0.95
eachFunction · 0.50
isAnimationEnabledMethod · 0.45

Tested by

no test coverage detected