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

Horizontally flipped x-axis #738

Closed
cepages opened this issue Feb 4, 2016 · 5 comments
Closed

Horizontally flipped x-axis #738

cepages opened this issue Feb 4, 2016 · 5 comments
Labels

Comments

@cepages
Copy link

cepages commented Feb 4, 2016

Hi, my app is in iOS9 and it's in English and Arabic. I'm using the Chart LineChartView

Whit the new methods from UIKit for International User Interfaces is pretty easy to mirror all the elements, but I can't mirror the graph.

Currently with my phone in Arabic and with the right localization all views are mirrored except the Chart.

Also because LineChartView is a view I tried:
[[LineChartView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceRightToLeft];

But it didn't work, is there any way to do it? It's because the library doesn't support this?

Thanks.

@danielgindi
Copy link
Collaborator

The library does not support this fully.

There are things you can do: For example you can tell the legend to be RTL.

Note that in most cases when dealing with numbers the correct thing to do is have the axis on the left, as numbers go from left to right.
When dealing with text - then it depends on your language...

@cepages
Copy link
Author

cepages commented Feb 4, 2016

Thanks @danielgindi

About the number I think that if you have the number in Arabic this would follow the direction right to left. So I guess the axis would be needed inverted, is possible to do this manually?

@danielgindi
Copy link
Collaborator

I guess there would be cases where an inverted axis is required.

It is not supported right now - but in about 10 minutes I think you can get it working. Look at the code for the horizontal bar chart axis renderer - it flips all the axes on the side.
You just need ltr-rtl flipping - which should be much easier :-)

@danielgindi danielgindi changed the title Charts right to left for Arabic language Horizontally flipped x-axis Feb 23, 2016
@danielgindi
Copy link
Collaborator

This seems like a duplicate of #253. See the updates there...

@Dev-Khaled
Copy link

Just revert your dataset, and enable right axes instead of left axes, this should do the trick

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

No branches or pull requests

3 participants