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

[Bug]: Evenly spaced labels/ticks on axis #647

Closed
christopherkindl opened this issue Sep 1, 2023 · 5 comments · Fixed by #762 or #767
Closed

[Bug]: Evenly spaced labels/ticks on axis #647

christopherkindl opened this issue Sep 1, 2023 · 5 comments · Fixed by #762 or #767
Assignees
Labels
Status: In Progress We are actively fixing/implementing this issue/feature

Comments

@christopherkindl
Copy link
Member

Tremor Version

v3.6.6

Link to minimal reproduction

n/a

Steps to reproduce

see image below

What is expected?

Ticks/labels should be evenly spaced along the axis.

What is actually happening?

There are some cases in which the gap between two labels is larger than the rest of it. This also happens on the y-axis. According, to the Recharts team this has something to do with the padding prop in their <XAxis/> / <YAxis/> component. This is a weird bug/behavior that probably requires changes in Rechart's root code. We posted the issue in their repo as well. If anyone in our community has a smart solution for this, you would be our star! ⭐

evenly_spaced

What browsers are you seeing the problem on?

No response

Any additional comments?

No response

@omriluz
Copy link

omriluz commented Sep 3, 2023

Hey I explored it a bit and, it seems that this whole section is made out of SVG? anyway it seems like the calculation is wrong for the spacing since there is no flex or grid layout it relies solely on Math, Just a lead for anyone that wants to take a crack as well, I'll keep trying

@christopherkindl
Copy link
Member Author

Hi @omriluz, thanks for your expertise here! 👍

@christopherkindl
Copy link
Member Author

christopherkindl commented Sep 11, 2023

We moved our feature request for Recharts to an another, existing issue: recharts/recharts#3305

@christopherkindl
Copy link
Member Author

Recharts pushed hard for this feature and it will be released soon. We just tested the new option, and it looks muuuuch better!

recharts/recharts#3768

@christopherkindl christopherkindl added Status: In Progress We are actively fixing/implementing this issue/feature and removed Status: Help Wanted We need help with this issue labels Sep 22, 2023
@severinlandolt severinlandolt linked a pull request Oct 17, 2023 that will close this issue
14 tasks
@severinlandolt severinlandolt self-assigned this Oct 18, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 3.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In Progress We are actively fixing/implementing this issue/feature
Projects
None yet
3 participants