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

Multiline axis labels are cut off #2244

Closed
claudioredi opened this issue Mar 14, 2017 · 5 comments
Closed

Multiline axis labels are cut off #2244

claudioredi opened this issue Mar 14, 2017 · 5 comments

Comments

@claudioredi
Copy link

claudioredi commented Mar 14, 2017

Thanks for writing this library! It's a really great component :)

I'm having an issue with multiline labels. Depending on the amount of data to be shown on x axis, labels are cut off or not. Here you have two examples

Working Labels
2017-03-14_1911

Non Working Labels
2017-03-14_1913

Data is exactly the same, on second chart I limited the amount of X items to be shown. If I tap on the second chart, it gets fixed but points and labels still unaligned.

2017-03-14_2002

Is there any way to be sure that label won't be ever cut off? I was looking a way to force the height of the chart to be sure it's always the same but couldn't find any.

Also, I see that on the first chart labels and points are vertically aligned while on the second they are not. Is it possible also to force 1 point -> 1 label and make them aligned vertically?

@liuxuan30
Copy link
Member

Have you changed any library code? Or just using world wrapping feature? It looks like the offset is wrong.
For aligning - by default x axis labels are not the same as data values, so no guarantee, unless you return x axis values the same as data values
I don't know why your first image is aligned so well

@claudioredi
Copy link
Author

@liuxuan30: thanks for your answer. I haven't changed anything on the library. I'm using value formatter to convert numbers into that multiline string you see on X axis (words separated by "\n")

Not sure what you mean with "unless you return x axis values the same as data values". I really need X axis labels to be aligned to points, otherwise my chart make no sense. Could you please clarify?

I could add some code if necessary.

@claudioredi
Copy link
Author

I Resolved the alignment problem using granularity property = 1. I still have the issue of labels being cut off. On double tap problem gets resolved as you can see on this video

https://www.screencast.com/t/g7G00TogO4dX

@claudioredi
Copy link
Author

Fixed the cutt off problem. I was calling _mChart.SetVisibleXRangeMaximum(4); (this is Xamarin, C#) before defining the chart frame. Moving that line later in my code fixed the label issue. This can be closed.

Thanks.

@liuxuan30
Copy link
Member

glad to close :)

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

2 participants