Skip to content

Commit

Permalink
Fixed weird glitch in mixed (pos/neg) stacked bars highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Oct 31, 2016
1 parent 3a879e9 commit 00f3605
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public BarEntry(float x, float[] vals) {
super(x, calcSum(vals));

this.mYVals = vals;
calcRanges();
calcPosNegSum();
calcRanges();
}

/**
Expand All @@ -67,8 +67,8 @@ public BarEntry(float x, float[] vals, String label) {
super(x, calcSum(vals), label);

this.mYVals = vals;
calcRanges();
calcPosNegSum();
calcRanges();
}

/**
Expand Down Expand Up @@ -242,8 +242,8 @@ protected void calcRanges() {
float value = values[i];

if (value < 0) {
mRanges[i] = new Range(negRemain, negRemain + value);
negRemain += Math.abs(value);
mRanges[i] = new Range(negRemain, negRemain - value);
negRemain -= value;
} else {
mRanges[i] = new Range(posRemain, posRemain + value);
posRemain += value;
Expand Down

0 comments on commit 00f3605

Please sign in to comment.