Skip to content

Commit

Permalink
Minor fix in BarChart
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilJay committed Jul 31, 2015
1 parent 4aabae1 commit d722da5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions MPChartLib/src/com/github/mikephil/charting/charts/BarChart.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,8 @@ protected void calcMinMax() {
// extend xDelta to make space for multiple datasets (if ther are one)
mDeltaX *= mData.getDataSetCount();

int maxEntry = 0;

for (int i = 0; i < mData.getDataSetCount(); i++) {

DataSet<? extends Entry> set = mData.getDataSetByIndex(i);

if (maxEntry < set.getEntryCount())
maxEntry = set.getEntryCount();
}

float groupSpace = mData.getGroupSpace();
mDeltaX += maxEntry * groupSpace;
mDeltaX += mData.getXValCount() * groupSpace;
mXChartMax = mDeltaX - mXChartMin;
}

Expand Down

0 comments on commit d722da5

Please sign in to comment.