set min graph vertical labels

This commit is contained in:
Milos Kozak 2021-10-21 16:33:37 +02:00
parent d520c45aba
commit 6ada88b1f8

View file

@ -202,7 +202,7 @@ class GraphData(
} }
fun setNumVerticalLabels() { fun setNumVerticalLabels() {
graph.gridLabelRenderer.numVerticalLabels = if (units == GlucoseUnit.MGDL) (maxY / 40 + 1).toInt() else (maxY / 2 + 1).toInt() graph.gridLabelRenderer.numVerticalLabels = max(3, if (units == GlucoseUnit.MGDL) (maxY / 40 + 1).toInt() else (maxY / 2 + 1).toInt())
} }
fun formatAxis(fromTime: Long, endTime: Long) { fun formatAxis(fromTime: Long, endTime: Long) {