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

Component | Axis: Add tick label rotation #394

Merged
merged 4 commits into from
Jun 4, 2024
Merged

Component | Axis: Add tick label rotation #394

merged 4 commits into from
Jun 4, 2024

Conversation

lee00678
Copy link
Collaborator

Following this PR. Moved rotate out of FitMode.

  • Adding a new variable called tickTextAngle to allow user to pass in a number for label rotation. This feature should be used along with tickTextAlign to get the desired result (we want to provide more control to the user).
  • New dev example
  • Add related documentation

Screenshot 2024-05-28 at 2 31 05 PM

@lee00678 lee00678 requested a review from reb-dev May 28, 2024 21:37
Copy link
Collaborator

@reb-dev reb-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lee00678 , looks good!

I noticed an edge case- when a label is very long at the end, the label gets cut off on initial render. On resize, it updates correctly but if we refresh the page we see it again.

Screen.Recording.2024-05-31.at.9.52.42.AM.mov

@lee00678
Copy link
Collaborator Author

@lee00678 , looks good!

I noticed an edge case- when a label is very long at the end, the label gets cut off on initial render. On resize, it updates correctly but if we refresh the page we see it again.

I think this may be an existing issue. Perhaps we should address this in a separate PR?
(Screenshot taken frommain)

Screen.Recording.2024-05-31.at.1.14.30.PM.mov

@reb-dev
Copy link
Collaborator

reb-dev commented May 31, 2024

@lee00678

I think this may be an existing issue. Perhaps we should address this in a separate PR? (Screenshot taken frommain)

You're totally right. Let's move to a separate issue.

@rokotyan
Copy link
Contributor

@reb-dev @lee00678 Confirming that the issue has been there before. It's a bit tricky to calculate the required margins automatically and apparently the current logic has some flaws. Let me know if you decide to take a look into it, I can give you a quick walk through explaining how it works.

@lee00678
Copy link
Collaborator Author

lee00678 commented Jun 3, 2024

@reb-dev @lee00678 Confirming that the issue has been there before. It's a bit tricky to calculate the required margins automatically and apparently the current logic has some flaws. Let me know if you decide to take a look into it, I can give you a quick walk through explaining how it works.

Yea margin calculation could be tricky. I took a brief look at it while implementing this feature. I will add an item to our issue list so we don't forget about it.

@lee00678 lee00678 merged commit d86539f into main Jun 4, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants