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 e7e0666507..8c3041ba26 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
@@ -304,9 +304,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
}
});
*/
- bgGraph.getGridLabelRenderer().setGridColor(Color.rgb(0x75, 0x75, 0x75));
+ bgGraph.getGridLabelRenderer().setGridColor(MainApp.sResources.getColor(R.color.graphgrid));
bgGraph.getGridLabelRenderer().reloadStyles();
- iobGraph.getGridLabelRenderer().setGridColor(Color.rgb(0x75, 0x75, 0x75));
+ iobGraph.getGridLabelRenderer().setGridColor(MainApp.sResources.getColor(R.color.graphgrid));
iobGraph.getGridLabelRenderer().reloadStyles();
iobGraph.getGridLabelRenderer().setHorizontalLabelsVisible(false);
bgGraph.getGridLabelRenderer().setLabelVerticalWidth(50);
@@ -1215,15 +1215,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
endTime = toTime;
}
- // **** HIGH and LOW targets graph ****
+ // **** Area ****
DoubleDataPoint[] areaDataPoints = new DoubleDataPoint[]{
new DoubleDataPoint(fromTime, lowLine, highLine),
new DoubleDataPoint(endTime, lowLine, highLine)
};
- bgGraph.addSeries(areaSeries = new AreaGraphSeries<>(areaDataPoints));
+ areaSeries = new AreaGraphSeries<>(areaDataPoints);
areaSeries.setColor(0);
areaSeries.setDrawBackground(true);
- areaSeries.setBackgroundColor(Color.argb(40, 0, 255, 0));
+ areaSeries.setBackgroundColor(MainApp.sResources.getColor(R.color.inrangebackground));
// set manual x bounds to have nice steps
bgGraph.getViewport().setMaxX(endTime);
@@ -1236,6 +1236,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
iobGraph.getViewport().setXAxisBoundsManual(true);
iobGraph.getGridLabelRenderer().setLabelFormatter(new TimeAsXAxisLabelFormatter(getActivity(), "HH"));
iobGraph.getGridLabelRenderer().setNumHorizontalLabels(7); // only 7 because of the space
+ bgGraph.onDataChanged(false, false);
+ iobGraph.onDataChanged(false, false);
}
@@ -1315,14 +1317,14 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
baseBasal = baseBasalArray.toArray(baseBasal);
baseBasalsSeries = new LineGraphSeries<>(baseBasal);
baseBasalsSeries.setDrawBackground(true);
- baseBasalsSeries.setBackgroundColor(Color.argb(200, 0x3F, 0x51, 0xB5));
+ baseBasalsSeries.setBackgroundColor(MainApp.sResources.getColor(R.color.basebasal));
baseBasalsSeries.setThickness(0);
DataPoint[] tempBasal = new DataPoint[tempBasalArray.size()];
tempBasal = tempBasalArray.toArray(tempBasal);
tempBasalsSeries = new LineGraphSeries<>(tempBasal);
tempBasalsSeries.setDrawBackground(true);
- tempBasalsSeries.setBackgroundColor(Color.argb(200, 0x03, 0xA9, 0xF4));
+ tempBasalsSeries.setBackgroundColor(MainApp.sResources.getColor(R.color.tempbasal));
tempBasalsSeries.setThickness(0);
DataPoint[] basalLine = new DataPoint[basalLineArray.size()];
@@ -1511,6 +1513,9 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
bgGraph.getSecondScale().getSeries().clear();
bgGraph.removeAllSeries();
+ // **** Area ***
+ bgGraph.addSeries(areaSeries);
+
// **** BG graph ****
if (bgSeries != null) {
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ec474e9b61..33234e596d 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -11,6 +11,10 @@
#f0003f59
#FF33B5E5
#FF0000
+ #2800FF00
+ #C83F51B5
+ #C803A9F4
+ #757575
#50ffffff
#424242