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

Charts and data vizualisation #30

Open
ffoodd opened this issue Sep 25, 2023 · 3 comments
Open

Charts and data vizualisation #30

ffoodd opened this issue Sep 25, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ffoodd
Copy link

ffoodd commented Sep 25, 2023

Hi there!

Back to RTL topic, I'm currently implementing RTL in chaarts and decided for some kind of charts to not flip them. Here're my thoughts:

  • for circular charts (pie, radar, etc.) keep them as in LTR: legends should be flipped, but the overall look stays the same. Most of the time, such charts are read clockwise.
  • other charts are flipped, especially date-relative data charts.

FWIW, there're some edge cases regarding RTL in CSS which are bit weird to me, mostly clip-path and transform which keeps referring to top left as a starting point. There might be others, as well.

If you have any insight regarding this, I'd be pleased to know :)

@shadeed
Copy link
Owner

shadeed commented Oct 3, 2023

Hello hello! :)

The charts is an interesting topic to be covered on RTL Styling 101. I agree with your point on the circular charts, no need to flip them. But for the data-relative (like tables), flipping is needed.

FWIW, there're some edge cases regarding RTL in CSS which are bit weird to me, mostly clip-path and transform which keeps referring to top left as a starting point. There might be others, as well.

Would you share an example? If I got your point, that means that in a chart that uses clip-path, top-left needs to be flipped in RTL.

@ffoodd
Copy link
Author

ffoodd commented Oct 3, 2023

Here's an example in chaarts: https://ffoodd.github.io/chaarts/line-charts.html (WIP so might change or not work).

FWIW the simplest way to handle clip-path I could find is to use transform: scale(-1). Works fine in my case!

I suppose JS-based SVG charts can handle this in different ways, though.

@shadeed
Copy link
Owner

shadeed commented Oct 3, 2023

Totally agree. Using scale(-1) is a good fix and it works perfectly with CSS.

Thanks for shedding the light on this topic! I will research more and try to include it in a future update.

@shadeed shadeed added the enhancement New feature or request label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants