From 5f9610ec03ef3af02a05c4ac7919e732c77b64b7 Mon Sep 17 00:00:00 2001 From: OliE Date: Sat, 24 Feb 2018 08:31:39 +0100 Subject: [PATCH] removed average count label on graph data points to reduce the label width --- .../health/openscale/gui/fragments/GraphFragment.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/android_app/app/src/main/java/com/health/openscale/gui/fragments/GraphFragment.java b/android_app/app/src/main/java/com/health/openscale/gui/fragments/GraphFragment.java index 0b234834..4219400b 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/fragments/GraphFragment.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/fragments/GraphFragment.java @@ -275,15 +275,7 @@ public class GraphFragment extends Fragment implements FragmentUpdateListener { if (prefs.getBoolean("averageData", true) && !pointValues.isEmpty() && pointValues.peek().getX() == value_x) { PointValue prevValue = pointValues.pop(); PointValue newValue = new PointValue(value_x, (prevValue.getY() + value_y) / 2.0f); - - if (prevValue.getLabelAsChars() != null) { - int avgCount = Character.getNumericValue(prevValue.getLabelAsChars()[prevValue.getLabelAsChars().length-3]) * 10 + - Character.getNumericValue(prevValue.getLabelAsChars()[prevValue.getLabelAsChars().length-2]) + 1; - - newValue.setLabel(String.format("Ø %.2f (%02d)", newValue.getY(), avgCount)); - } else { - newValue.setLabel(String.format("Ø %.2f (%02d)", newValue.getY(), 2)); - } + newValue.setLabel(String.format("Ø %.2f", newValue.getY())); pointValues.push(newValue); } else {