Remove Custom Check

calculate() no longer checks if min and max is custom, it just adds the padding.
This commit is contained in:
almic 2018-04-27 00:08:27 -06:00
parent 3e1eb1445a
commit e1411f169e
No known key found for this signature in database
GPG key ID: 432BBCA8E2FFF871

View file

@ -373,19 +373,11 @@ public class YAxis extends AxisBase {
min = min - 1f;
}
// bottom-space only effects non-custom min
if (!mCustomAxisMin) {
float bottomSpace = range / 100f * getSpaceBottom();
this.mAxisMinimum = (min - bottomSpace);
}
// top-space only effects non-custom max
if (!mCustomAxisMax) {
float topSpace = range / 100f * getSpaceTop();
this.mAxisMaximum = (max + topSpace);
}
float bottomSpace = range / 100f * getSpaceBottom();
this.mAxisMinimum = (min - bottomSpace);
float topSpace = range / 100f * getSpaceTop();
this.mAxisMaximum = (max + topSpace);
// calc actual range
this.mAxisRange = Math.abs(this.mAxisMaximum - this.mAxisMinimum);