1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00
This commit is contained in:
cpfeiffer 2016-09-29 22:16:08 +02:00
parent f58b1f33c6
commit fbfc9ed97f
3 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@ import com.github.mikephil.charting.charts.Chart;
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.CombinedData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -117,6 +118,7 @@ public class ActivitySleepChartFragment extends AbstractChartFragment {
protected void updateChartsnUIThread(ChartsData chartsData) {
DefaultChartsData dcd = (DefaultChartsData) chartsData;
mChart.getLegend().setTextColor(LEGEND_TEXT_COLOR);
mChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
mChart.setData(dcd.getCombinedData());
}

View File

@ -99,6 +99,7 @@ public class SleepChartFragment extends AbstractChartFragment {
mSleepAmountChart.setCenterText(mcd.getPieData().getTotalSleep());
mSleepAmountChart.setData(mcd.getPieData().getPieData());
mActivityChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
mActivityChart.setData(mcd.getChartsData().getCombinedData());
}

View File

@ -67,6 +67,7 @@ public class WeekStepsChartFragment extends AbstractChartFragment {
mTodayStepsChart.setCenterText(NumberFormat.getNumberInstance(mLocale).format(mcd.getDaySteps().totalSteps));
mTodayStepsChart.setData(mcd.getDaySteps().data);
mWeekStepsChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
mWeekStepsChart.setData(mcd.getWeekBeforeStepsData().getCombinedData());
mWeekStepsChart.getLegend().setEnabled(false);
}