Skip to content
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

Day label is drifting on the left when calendar range is getting smaller #11508

Closed
Winbee opened this issue Oct 29, 2019 · 3 comments
Closed
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English priority: normal

Comments

@Winbee
Copy link

Winbee commented Oct 29, 2019

Version

4.4.0

Reproduction link

https://www.echartsjs.com/examples/en/editor.html?c=calendar-horizontal

Steps to reproduce

What is expected?

The day label should remain at the same position.

What is actually happening?

The day label is moving further and and further on the left when we decrease the range.

@Winbee
Copy link
Author

Winbee commented Oct 29, 2019

range: ['2017-01', '2017-04'],
Screenshot 2019-10-29 at 8 21 20

range: ['2017-01', '2017-03'],
Screenshot 2019-10-29 at 8 24 47

range: ['2017-01', '2017-02'],
Screenshot 2019-10-29 at 8 25 01

@yufeng04
Copy link
Contributor

It seems to be a bug!

@Ovilia Ovilia added bug difficulty: easy Issues that can be fixed more easily than the average. priority: normal en This issue is in English labels Oct 31, 2019
@Nick22nd
Copy link
Contributor

The issue as I tracking:

If orient is horizontal and range changes, the cell will automatically adjust its width.
But the weekly text margin is always equalling 50% width of cellSize.

I tried to fix it by making daylabel margin always be the cell's height .
It seems that the issue will be fixed. But I have 2 problem:

  1. I don't know whether it will cause another issue.
  2. I only changed 1 line code ,should I make a PR?

pissang added a commit that referenced this issue Mar 30, 2021
fix(Calendar): fix day label drifting. close #11508
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug difficulty: easy Issues that can be fixed more easily than the average. en This issue is in English priority: normal
Projects
None yet
Development

No branches or pull requests

4 participants