diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/SpeedZonesFragment.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/SpeedZonesFragment.java index d313ceb1..382ac884 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/SpeedZonesFragment.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/charts/SpeedZonesFragment.java @@ -24,7 +24,6 @@ import android.view.ViewGroup; import com.github.mikephil.charting.charts.Chart; import com.github.mikephil.charting.charts.HorizontalBarChart; -import com.github.mikephil.charting.components.LegendEntry; import com.github.mikephil.charting.components.XAxis; import com.github.mikephil.charting.components.YAxis; import com.github.mikephil.charting.data.BarData; @@ -130,31 +129,14 @@ public class SpeedZonesFragment extends AbstractChartFragment { } @Override - protected void setupLegend(Chart chart) { - List legendEntries = new ArrayList<>(3); - LegendEntry lightSleepEntry = new LegendEntry(); - lightSleepEntry.label = akLightSleep.label; - lightSleepEntry.formColor = akLightSleep.color; - legendEntries.add(lightSleepEntry); - - LegendEntry deepSleepEntry = new LegendEntry(); - deepSleepEntry.label = akDeepSleep.label; - deepSleepEntry.formColor = akDeepSleep.color; - legendEntries.add(deepSleepEntry); - - if (supportsHeartrate(getChartsHost().getDevice())) { - LegendEntry hrEntry = new LegendEntry(); - hrEntry.label = HEARTRATE_LABEL; - hrEntry.formColor = HEARTRATE_COLOR; - legendEntries.add(hrEntry); - } - chart.getLegend().setCustom(legendEntries); - chart.getLegend().setTextColor(LEGEND_TEXT_COLOR); + protected List getSamples(DBHandler db, GBDevice device, int tsFrom, int tsTo) { + return super.getAllSamples(db, device, tsFrom, tsTo); } @Override - protected List getSamples(DBHandler db, GBDevice device, int tsFrom, int tsTo) { - return super.getAllSamples(db, device, tsFrom, tsTo); + protected void setupLegend(Chart chart) { + // no legend here, it is all about the steps here + chart.getLegend().setEnabled(false); } @Override