-
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
feat(label): support align for min/max labels #19228
Conversation
Thanks for your contribution! The pull request is marked to be Document changes are required in this PR. Please also make a PR to apache/echarts-doc for document changes and update the issue id in the PR description. When the doc PR is merged, the maintainers will remove the |
The changes brought by this PR can be previewed at: https://echarts.apache.org/examples/editor?version=PR-19228@3ea1970 |
@Ovilia hllo mam myself harsh ,mam i am new to apache so i want to join its slack but i don't have email auhtorised by apache with workspace @apache.org so how can i join the slack |
Hi, we don't use Slack. Please subscribe our mailing list. |
okk sure mam |
Will it be more flexible if we can provide something like |
@pissang Thanks for reminding. I think it should be enough with alignment for the first and last label, because the first / last label should not be more important than the others (think the case with dataZoom, where the first label is not fixed). The reason why we need So, I would suggest provide |
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?
In some cases, especially when the canvas size is limited, we wish to confine the axis labels to be within an area rather than may be outside of the canvas when the label text is long. In this PR, I proposed a way to set align/verticalAlign for the first and last labels so that we can make sure they are within the boundary of the grid area.
Fixed issues
#19215
Details
Before: What was the problem?
The first and last label may be too long to be displayed when the text is long and the canvas size is limited.
After: How does it behave after the fixing?
When setting
alignMinLabel: 'left', alignMaxLabel: 'right'
we can make sure the text is within the grid's width and the inner labels may hide when overlap.Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information