Skip to content

Fix/label layout margin #21103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 21, 2025
Merged

Fix/label layout margin #21103

merged 8 commits into from
Jul 21, 2025

Conversation

100pah
Copy link
Member

@100pah 100pah commented Jul 15, 2025

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

Most of the changes are the renaming of TS type and methods.

Require zrender ecomfe/zrender#1134

What does this PR do?

  • Clarify some of the uniformly use label layout API and data structure.
  • Fix that some label props were not updated during layout (bug-prone) in certain places.
  • Use uniform label helpers on pie label layout.
    • After that, all of the minMargin and textMargin process are uniformed, both in impl and doc.
  • Fix the inconsistent behavior in pie label layout.
    • Previously calling getBoundingRect before textConfig applied (causing the result diff).
    • Previously adding extra margin for "auto text stroke" even if no auto text stroke added. Currently use Fix text bounding rect ecomfe/zrender#1134 to uniform the behavior.

Visual Test

Visual Regression Test Report.html.zip

No unexpected diff

100pah added 7 commits July 6, 2025 18:06
…ause they affect auto-color-determination in zrender Text (e.g., Element.getOutsideStroke), and consequently affect the bounding rect if stroke is added.
…ta structure. Fix that some label props were not updated during layout in certain places.
…the inconsistent behavior in pie label layout - (2.1) Previously calling `getBoundingRect` before textConfig applied (causing the result diff). (2.2) Previously adding extra margin for "auto text stroke" even if no auto text stroke added. Currently use ecomfe/zrender#1134 to uniform the behavior.
Copy link
Contributor

github-actions bot commented Jul 15, 2025

The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-21103@8dbf829

Ovilia
Ovilia previously approved these changes Jul 18, 2025
@Ovilia Ovilia merged commit e1948aa into master Jul 21, 2025
2 checks passed
@Ovilia Ovilia deleted the fix/label-layout-margin branch July 21, 2025 04:02
@Ovilia Ovilia added this to the 6.0.0 milestone Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants