Skip to content

Commit d722da5

Browse files
committed
Minor fix in BarChart
1 parent 4aabae1 commit d722da5

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

MPChartLib/src/com/github/mikephil/charting/charts/BarChart.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,8 @@ protected void calcMinMax() {
7676
// extend xDelta to make space for multiple datasets (if ther are one)
7777
mDeltaX *= mData.getDataSetCount();
7878

79-
int maxEntry = 0;
80-
81-
for (int i = 0; i < mData.getDataSetCount(); i++) {
82-
83-
DataSet<? extends Entry> set = mData.getDataSetByIndex(i);
84-
85-
if (maxEntry < set.getEntryCount())
86-
maxEntry = set.getEntryCount();
87-
}
88-
8979
float groupSpace = mData.getGroupSpace();
90-
mDeltaX += maxEntry * groupSpace;
80+
mDeltaX += mData.getXValCount() * groupSpace;
9181
mXChartMax = mDeltaX - mXChartMin;
9282
}
9383

0 commit comments

Comments
 (0)