-
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
Time Axis is display can overlap in v5 #14266
Comments
Hi! We've received your issue and please be patient to get responded. 🎉 In the meanwhile, please make sure that you have posted enough image to demo your request. You may also check out the API and chart option to get the answer. If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to [email protected]. Please attach the issue link if it's a technical question. If you are interested in the project, you may also subscribe our mailing list. Have a nice day! 🍵 |
It looks like setting |
Unfortunately the workaround (setting xAxis.splitNumber to 5) does not work for me: see this example echarts versin 5.2.0 Quote from the
So I tried xAxis.interval:
But this does also not work Also xAxis.axisLabel.interval had no effect. Any idea why this is not working in my example? |
I think |
This issue is labeled with |
Any news on this bugfix? :) |
We'd like to use the upgraded version at GitLab however this bug is a blocker for us. I'd like to help and submit a PR. Is there any link to any discussion @pissang, where I could have more insight on where to look? Seems like this happens mostly with the Time based labels and it seems like the day/month are not evenly spaced: If you check here, the left space between |
@svedova Hi, Thanks for helping fix it. There is a helper function that can hide the overlapped labels. https://github.com/apache/echarts/blob/master/src/label/labelLayoutHelper.ts#L289 The year > month > day > hour > minutes > second > millesecond Feel free to ask in this thread if you have any more questions:) |
@pissang thanks for the help! At which state am I supposed to use the Initially I thought I would alter the Is it a good place to use the Another question, Unfortunately there are not many examples in the codebase using these two helpers (only the |
@svedova Sorry for the late reply. Usually, Some properties of interface LabelLayoutListPrepareInput {
label: ZRText
labelLine?: Polyline
computedLayoutOption?: LabelLayoutOption
priority: number
defaultAttr: {
ignore: boolean
labelGuideIgnore?: boolean
}
}
|
Version
5.0.2
Reproduction link
https://echarts.apache.org/examples/en/editor.html?c=dynamic-data2
Steps to reproduce
Go to official example and reduce the window size. Then x axis labels will overlap and look crappy.
What is expected?
The ticks should gently disappear to let only a few appear.
What is actually happening?
Labels overlap and look crappy.
Example on my app:
![image](https://user-images.githubusercontent.com/37897072/107814606-7a456680-6d72-11eb-9481-38122ab6ca77.png)
Example in the official example:
![image](https://user-images.githubusercontent.com/37897072/107814706-9fd27000-6d72-11eb-8b73-827499e4b742.png)
Worked well in v4 (see https://echarts.apache.org/v4/examples/en/editor.html?c=dynamic-data2)
The text was updated successfully, but these errors were encountered: