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

Statistics num and dates overlapping in RTL #4306

Open
jermanuts opened this issue Dec 14, 2024 · 5 comments
Open

Statistics num and dates overlapping in RTL #4306

jermanuts opened this issue Dec 14, 2024 · 5 comments

Comments

@jermanuts
Copy link

jermanuts commented Dec 14, 2024

Go to any app page and click on "Statistics"

Switch to RTL languages such as ar, fa etc

image

image

@razzeee
Copy link
Member

razzeee commented Dec 14, 2024

Ideally this would be fixed by shadcn-ui/ui#1638

@jjeem
Copy link

jjeem commented Dec 28, 2024

Ideally this would be fixed by shadcn-ui/ui#1638

This will not solve it. It's an issue with Recharts and not Shadcn. To fix it, LTR layout should be forced on the component by explicitly setting it.

@razzeee
Copy link
Member

razzeee commented Dec 28, 2024

LTR?

@jjeem
Copy link

jjeem commented Dec 28, 2024

RTL has no effect here but causing this bug. The dates are still displayed in Left-To-Right order.
So setting dir="ltr" should fix the overlapping.

If you want RTL look, LTR layout is still needed and can be done by

  • setting reversed prop on XAxis components
  • setting orientation="right" on YAxis components

And I think I read somewhere Recharts won't release the fix until v3

@jermanuts
Copy link
Author

jermanuts commented Dec 30, 2024

You can have an idea on how it should look like from this chart: https://trends.google.com/trends/explore?q=google&hl=ar

  • Issue with text overlapping

  • There's an issue with the order of how the date is displayed, when hovering over the chart, it should be: year/month/day.

date h

  • The text below the x axis should have number first then month (RTL reading)

date

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

No branches or pull requests

3 participants