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(axisLabel): fix axisLabel rotating with grid.containLabel #12259 #12556
Conversation
Thanks for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't submit any dist
file
@susiwen8 Thanks for kind reminder. Revert changes in |
@quillblue Could you add a test case for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source code changes look good to me.
I think the test case could be included in the current test case axisLabel.html
.
@Ovilia combined to |
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?
Update function of calculating updated height & width for rotated axis labels
Fix issue #12259
Fixed issues
Close #12259
Details
In previous
rotateTextRect()
in axisHelper.js, take cos value of negative rotate will got negative result, which causes calculated width/height of rotated axis label is smaller than actual size. In grid, it will cause axis labels be cut.After: How is it fixed in this PR?
As physically we need cos/sin of rotate angle to be positive (or 0), add Math.abs here to solve this issue,
Usage
Are there any API changes?
Related test cases or examples to use the new APIs
NA.
Others
Merging options
Other information