Skip to content

Commit 58845eb

Browse files
committed
Fixed a potential crash in CombinedChart with lineData and only one x-value
Deployed same deltaX fix as in LineChart
1 parent 8065d17 commit 58845eb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ protected void calcMinMax() {
102102
}
103103

104104
mDeltaX = Math.abs(mXChartMax - mXChartMin);
105+
106+
if (mDeltaX == 0.f && getLineData() != null && getLineData().getYValCount() > 0) {
107+
mDeltaX = 1.f;
108+
}
105109
}
106110

107111
@Override

0 commit comments

Comments
 (0)