-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
fix(pie): label layout and text wrapping #16034
Conversation
Thanks for your contribution! The pull request is marked to be This PR depends on ZRender changes. Please update the ZRender dependency to the latest nightly version including this change, which takes place everyday at 8:00 UTC (16:00 Beijing Time). |
TODO:
|
@pissang Thanks for your review. I've made a new commit to fix them and no new diff in this commit. Please review again when you have time. |
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
Brief Information
This pull request is in the type of:
What does this PR do?
Fix pie label layout in multiple cases. Here are some of the typical cases:
A. Plain text cannot control wrapping and may be displayed outside of the canvas
(Left: before; Right: after)
B. The distances between
labelLine
and labels are not correct due to the width calculationC. The background area of rich text is not correct
D. Line width of rich text is not correct
E. When the text width is explicitly set, rich text area breaks the width constraint.
Most of the problems relates to text bounding rect calculation and this PR also fixes related logic with pie charts.
A full list of changes are listed in the "View Visual Test Result" part of this PR.
Fixed issues
#16023
Misc
Related test cases or examples to use the new APIs
test/pie-label-alignTo-adjust.html
Others
Merging options
Other information