From 23d12f728942aee7fe893eb8f0a99985ce52434f Mon Sep 17 00:00:00 2001 From: Andreas Shimokawa Date: Sun, 23 Jul 2017 17:53:35 +0200 Subject: [PATCH] Charts: various visual improvements Thanks @girlwithnoname --- .../activities/charts/AbstractChartFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/AbstractChartFragment.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/AbstractChartFragment.java index a8ad87d53..a2b0cb8c0 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/AbstractChartFragment.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/AbstractChartFragment.java @@ -487,7 +487,7 @@ public abstract class AbstractChartFragment extends AbstractGBFragment { } activityEntries.add(createBarEntry(value, ts)); if (hr && isValidHeartRateValue(sample.getHeartRate())) { - if (lastHrSampleIndex > -1 && ts - lastHrSampleIndex > 60*HeartRateUtils.MAX_HR_MEASUREMENTS_GAP_MINUTES) { + if (lastHrSampleIndex > -1 && ts - lastHrSampleIndex > 1800*HeartRateUtils.MAX_HR_MEASUREMENTS_GAP_MINUTES) { heartrateEntries.add(createLineEntry(0, lastHrSampleIndex + 1)); heartrateEntries.add(createLineEntry(0, ts - 1)); } @@ -530,7 +530,7 @@ public abstract class AbstractChartFragment extends AbstractGBFragment { List list = new ArrayList<>(); list.add(activitySet); BarData barData = new BarData(list); - barData.setBarWidth(100f); + barData.setBarWidth(200f); // barData.setGroupSpace(0); combinedData.setData(barData); @@ -595,10 +595,10 @@ public abstract class AbstractChartFragment extends AbstractGBFragment { protected LineDataSet createHeartrateSet(List values, String label) { LineDataSet set1 = new LineDataSet(values, label); - set1.setLineWidth(0.8f); + set1.setLineWidth(2.2f); set1.setColor(HEARTRATE_COLOR); // set1.setDrawCubic(true); - set1.setMode(LineDataSet.Mode.CUBIC_BEZIER); + set1.setMode(LineDataSet.Mode.HORIZONTAL_BEZIER); set1.setCubicIntensity(0.1f); set1.setDrawCircles(false); // set1.setCircleRadius(2f);