diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java index aa78e41856..d4a46d7f3a 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java @@ -54,7 +54,6 @@ public class BgGraphBuilder { private int bolusColor; public boolean singleLine = false; - private long endHour; private List inRangeValues = new ArrayList(); private List highValues = new ArrayList(); private List lowValues = new ArrayList(); @@ -407,17 +406,17 @@ public class BgGraphBuilder { //Display current time on the graph SimpleDateFormat longTimeFormat = new SimpleDateFormat(is24? "HH:mm" : "h:mm a"); - xAxisValues.add(new AxisValue(fuzz(timeNow), (longTimeFormat.format(timeNow)).toCharArray())); + xAxisValues.add(new AxisValue(fuzz(timeNow)).setLabel((longTimeFormat.format(timeNow)))); long hourTick = start_hour; // add all full hours within the timeframe while (hourTick < end_time){ if(Math.abs(hourTick - timeNow) > (1000 * 60 * 8 * timespan)){ - xAxisValues.add(new AxisValue(fuzz(hourTick), (timeFormat.format(hourTick)).toCharArray())); + xAxisValues.add(new AxisValue(fuzz(hourTick)).setLabel(timeFormat.format(hourTick))); } else { //don't print hour label if too close to now to avoid overlaps - xAxisValues.add(new AxisValue(fuzz(hourTick), "".toCharArray())); + xAxisValues.add(new AxisValue(fuzz(hourTick))); } //increment by one hour