MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Space between bar and xAxis labels.

Open pankaj210891 opened this issue 8 years ago • 15 comments

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 avatar May 30 '18 07:05 pankaj210891

Hi There,

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

pankaj210891 avatar Jun 05 '18 04:06 pankaj210891

If you could verify, whether newest master version fixes the problem that would be great. Your problem was probably fixed in PR https://github.com/PhilJay/MPAndroidChart/pull/4013

RobertZagorski avatar Jun 05 '18 08:06 RobertZagorski

@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.

pankaj210891 avatar Jun 06 '18 04:06 pankaj210891

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

RobertZagorski avatar Jun 06 '18 19:06 RobertZagorski

Hi,

Can u please share the link for the latest master library.

Get Outlook for Androidhttps://aka.ms/ghei36


From: RobertZagorski [email protected] Sent: Thursday, June 7, 2018 12:32:37 AM To: PhilJay/MPAndroidChart Cc: pankaj210891; Author Subject: Re: [PhilJay/MPAndroidChart] Space between bar and xAxis labels. (#4070)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PhilJay/MPAndroidChart/issues/4070#issuecomment-395178437, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVGMAG8nBhq0TPVexoZpUnHP6LDpdy8-ks5t6CdNgaJpZM4USt-g.

pankaj210891 avatar Jun 07 '18 01:06 pankaj210891

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.

RobertZagorski avatar Jun 08 '18 10:06 RobertZagorski

Hi There,

I am already using the library as a module.

I noticed that when any bar value is 0 then there is a space between the labels and X-axis.

Get Outlook for Androidhttps://aka.ms/ghei36


From: RobertZagorski [email protected] Sent: Friday, June 8, 2018 3:42:07 PM To: PhilJay/MPAndroidChart Cc: pankaj210891; Author Subject: Re: [PhilJay/MPAndroidChart] Space between bar and xAxis labels. (#4070)

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PhilJay/MPAndroidChart/issues/4070#issuecomment-395716546, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVGMAO-vwvzSGEEZNpQbde5jgLIbuLMyks5t6k33gaJpZM4USt-g.

pankaj210891 avatar Jun 08 '18 14:06 pankaj210891

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

RobertZagorski avatar Jun 08 '18 15:06 RobertZagorski

So what's now?

Get Outlook for Androidhttps://aka.ms/ghei36


From: RobertZagorski [email protected] Sent: Friday, June 8, 2018 8:46:52 PM To: PhilJay/MPAndroidChart Cc: pankaj210891; Author Subject: Re: [PhilJay/MPAndroidChart] Space between bar and xAxis labels. (#4070)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/PhilJay/MPAndroidChart/issues/4070#issuecomment-395793300, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVGMAEJXTthGFpatBE4Jcn8CdplfDDMLks5t6pVkgaJpZM4USt-g.

pankaj210891 avatar Jun 08 '18 16:06 pankaj210891

@RobertZagorski Any solution? or any suggestion.

pankaj210891 avatar Jun 14 '18 04:06 pankaj210891

@RobertZagorski Any solution? or any suggestion.

pankaj210891 avatar Jun 18 '18 10:06 pankaj210891

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

pankaj210891 avatar Jun 19 '18 09:06 pankaj210891

had a similar issue, was able to resolve with

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

AndroidGecko avatar May 21 '19 13:05 AndroidGecko

@AndroidGecko Thanks, but its a little bit changed like

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

faizanhaidarkhan avatar Mar 19 '20 08:03 faizanhaidarkhan

had a similar issue, was able to resolve with

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

(Y)

KhadijaHameed avatar Oct 26 '20 05:10 KhadijaHameed