1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Improve HR Y axis in sleep chart

This commit is contained in:
José Rebelo 2024-08-05 20:31:31 +01:00
parent 61e2411081
commit 2ed6247658

View File

@ -247,8 +247,8 @@ public class SleepChartFragment extends AbstractActivityChartFragment<SleepChart
&& supportsHeartrate(getChartsHost().getDevice()) && supportsHeartrate(getChartsHost().getDevice())
&& SHOW_CHARTS_AVERAGE) { && SHOW_CHARTS_AVERAGE) {
if (mcd.getHeartRateAxisMax() != 0 || mcd.getHeartRateAxisMin() != 0) { if (mcd.getHeartRateAxisMax() != 0 || mcd.getHeartRateAxisMin() != 0) {
mActivityChart.getAxisRight().setAxisMaximum(mcd.getHeartRateAxisMax()); mActivityChart.getAxisRight().setAxisMaximum(mcd.getHeartRateAxisMax() + (mcd.getHeartRateAxisMin() / 2f));
mActivityChart.getAxisRight().setAxisMinimum(mcd.getHeartRateAxisMin()); mActivityChart.getAxisRight().setAxisMinimum(mcd.getHeartRateAxisMin() / 2f);
} }
LimitLine hrAverage_line = new LimitLine(mcd.getHeartRateAverage()); LimitLine hrAverage_line = new LimitLine(mcd.getHeartRateAverage());
hrAverage_line.setLineColor(Color.RED); hrAverage_line.setLineColor(Color.RED);