From 0942ffe0fa61cb1edd2b461f2c158a9f9edf77de Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 24 Apr 2017 14:18:54 +0200 Subject: [PATCH] fix iob rendering 2 --- .../androidaps/plugins/Overview/OverviewFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index 419b8a76be..7d4c81c0c7 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -1045,6 +1045,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, LineGraphSeries cobSeries; Double maxIobValueFound = 0d; Double maxCobValueFound = 0d; + Long lastTime = 0L; if (showIobView.isChecked() || showCobView.isChecked()) { List iobArray = new ArrayList<>(); @@ -1060,7 +1061,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, //cobArray.add(new DataPoint(time, mealData.mealCOB)); //maxCobValueFound = Math.max(maxCobValueFound, mealData.mealCOB); } + lastTime = time; } + iobArray.add(new DataPoint(lastTime, 0)); // close the path iobArray.add(new DataPoint(fromTime, 0)); // close the path DataPoint[] iobData = new DataPoint[iobArray.size()]; iobData = iobArray.toArray(iobData);