Skip to content

Commit aa1500c

Browse files
committed
Fix OOM when create DefaultAxisValueFormatter
1 parent c04f3bd commit aa1500c

File tree

1 file changed

+1
-1
lines changed
  • MPChartLib/src/main/java/com/github/mikephil/charting/renderer

1 file changed

+1
-1
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/renderer/AxisRenderer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ abstract class AxisRenderer(
211211
}
212212

213213
// set decimals
214-
if (interval < 1) {
214+
if (interval > 0 && interval < 1) {
215215
axis.mDecimals = ceil(-log10(interval)).toInt()
216216
} else {
217217
axis.mDecimals = 0

0 commit comments

Comments
 (0)