From ab9c533ff3e367f507433b36616485c92997b7d5 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Sat, 13 Feb 2021 01:38:43 +0100 Subject: [PATCH] Fix crash of charts if no bg data exists in mg/dl --- .../androidaps/plugins/general/overview/graphData/GraphData.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt index d99334b74b..ae0d64e5b0 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/graphData/GraphData.kt @@ -66,7 +66,7 @@ class GraphData( bgReadingsArray = iobCobCalculatorPlugin.bgReadings if (bgReadingsArray?.isEmpty() != false) { aapsLogger.debug("No BG data.") - maxY = 10.0 + maxY = if (units == Constants.MGDL) 180.0 else 10.0 minY = 0.0 return }