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

rtl options for axis and labels #11937

Open
Vatsal6288 opened this issue Oct 24, 2024 · 1 comment
Open

rtl options for axis and labels #11937

Vatsal6288 opened this issue Oct 24, 2024 · 1 comment

Comments

@Vatsal6288
Copy link

Vatsal6288 commented Oct 24, 2024

Currently, Chart.js supports right-to-left (RTL) layout for legends and tooltips, but other chart elements like axes, labels, and some other components still use left-to-right (LTR) format. This creates an inconsistency when building charts for RTL languages.

It would be helpful if Chart.js provided full RTL support for all chart elements, not just legends and tooltips. This would ensure that the entire chart aligns correctly for RTL languages, making it more cohesive and user-friendly.

If there's another solution or workaround to achieve this without needing options for every individual element, please let me know.

@LeeLenaleee
Copy link
Collaborator

LeeLenaleee commented Nov 1, 2024

Maby I am understanding you wrong, in which case please correct me. But by default the labels for the ticks in the scales are centered. In which case it won't make a difference.

You can already set the alignment of the ticks to start or end instead of center I think will give you the same effect you are looking for.

https://www.chartjs.org/docs/4.4.6/samples/scale-options/ticks.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants