* Process all labels. Not only labels with layoutOption.
()
| 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. |
no test coverage detected