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 d6db6f5ea..afe0c7d27 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
@@ -69,6 +69,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
import nodomain.freeyourgadget.gadgetbridge.util.DeviceHelper;
+import nodomain.freeyourgadget.gadgetbridge.util.GBPrefs;
/**
* A base class fragment to be used with ChartsActivity. The fragment can supply
@@ -460,8 +461,14 @@ public abstract class AbstractChartFragment extends AbstractGBFragment {
// date = cal.getTime();
// dateStringTo = dateFormat.format(date);
// }
-
- float movement = sample.getIntensity();
+ int shownActivityType = GBApplication.getPrefs().getInt(GBPrefs.CHART_VISUAL_DATA, 0);
+ float movement = 0;
+ if (shownActivityType == 1){
+ movement = sample.getSteps();
+ }
+ else{
+ movement = sample.getIntensity();
+ }
float value = movement;
switch (type) {
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java
index c1579891d..f0b1625fe 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/ActivitySleepChartFragment.java
@@ -90,7 +90,7 @@ public class ActivitySleepChartFragment extends AbstractChartFragment {
y.setDrawGridLines(false);
// y.setDrawLabels(false);
// TODO: make fixed max value optional
- y.setAxisMaximum(1f);
+ //y.setAxisMaximum(200f);
y.setAxisMinimum(0);
y.setDrawTopYLabelEntry(false);
y.setTextColor(CHART_TEXT_COLOR);
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GBPrefs.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GBPrefs.java
index 1089280de..39581643d 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GBPrefs.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/util/GBPrefs.java
@@ -42,6 +42,7 @@ public class GBPrefs {
public static final String CHART_MAX_HEART_RATE = "chart_max_heart_rate";
public static final String CHART_MIN_HEART_RATE = "chart_min_heart_rate";
+ public static final String CHART_VISUAL_DATA = "chart_visual_data";
private final Prefs mPrefs;
diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml
index 97d95632c..a4d1d07a0 100644
--- a/app/src/main/res/values/arrays.xml
+++ b/app/src/main/res/values/arrays.xml
@@ -429,4 +429,13 @@
- 1800
+
+ - @string/activity_prefs_chart_visual_activity
+ - @string/activity_prefs_chart_visual_steps
+
+
+ - 0
+ - 1
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a93732580..be723c744 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -487,6 +487,9 @@
Chart settings
Max heart rate
Min heart rate
+ Shown activity data on chart
+ Activity
+ Steps
Authenticating
Authentication required
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index 95c8cd731..28c51e153 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -153,6 +153,14 @@
android:maxLength="3"
android:defaultValue="10"
android:title="@string/activity_prefs_chart_min_heart_rate" />
+
+