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

Space between bar and xAxis labels. #4070

Closed
pankaj210891 opened this issue May 30, 2018 · 15 comments
Closed

Space between bar and xAxis labels. #4070

pankaj210891 opened this issue May 30, 2018 · 15 comments

Comments

@pankaj210891
Copy link

Please help me xAxis labels and bar gap is increased if any of the bar value is 0.

Please look the below images.

When any bar value is 0;

device-2018-05-30-124154

When all bar value is more than 0;

device-2018-05-30-124318

I am sure you can notice the space in both situation, I want all labels to be assigned like in the second image irrespective of value.

@pankaj210891
Copy link
Author

Hi There,

I am still waiting for the response, 6 days are already gone.
Please reply back need to resolve this issue ASAP.

@RobertZagorski
Copy link
Contributor

If you could verify, whether newest master version fixes the problem that would be great.
Your problem was probably fixed in PR #4013

@pankaj210891
Copy link
Author

@RobertZagorski I am using the latest version of your library. The fix PR #4013 you shared is for label rotation, whereas I want to reduce the gap between the labels and the X-axis when any of the bar value is 0.

@RobertZagorski
Copy link
Contributor

You are checking newest git master ref or newest version published to bintray repository?
Those are the different ones.

@pankaj210891
Copy link
Author

pankaj210891 commented Jun 7, 2018 via email

@RobertZagorski
Copy link
Contributor

You need to download the library from github, make it as a module in your project (remove gradle dependency to MPAndroidChart), compile, open and try to reproduce the crash.

@pankaj210891
Copy link
Author

pankaj210891 commented Jun 8, 2018 via email

@RobertZagorski
Copy link
Contributor

So indeed this is a bug in the library.
Thanks for cooperating :)

@pankaj210891
Copy link
Author

pankaj210891 commented Jun 8, 2018 via email

@pankaj210891
Copy link
Author

pankaj210891 commented Jun 14, 2018

@RobertZagorski Any solution? or any suggestion.

1 similar comment
@pankaj210891
Copy link
Author

@RobertZagorski Any solution? or any suggestion.

@pankaj210891
Copy link
Author

@RobertZagorski Finally I resolved the issue using xAxis.setYOffset. Thanks for the help, I am closing this issue.

@AndroidGecko
Copy link

had a similar issue, was able to resolve with

chart.axisLeft.axisMinimum = 0f
chart.axisRight.axisMinimum = 0f

@faizanhaidarkhan
Copy link

@AndroidGecko Thanks, but its a little bit changed like

 chart.getAxisLeft().setAxisMinimum(0);
 chart.getAxisRight().setAxisMinimum(0);

@KhadijaHameed
Copy link

had a similar issue, was able to resolve with

chart.axisLeft.axisMinimum = 0f
chart.axisRight.axisMinimum = 0f

(Y)

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

5 participants