This commit is contained in:
parent
f58b1f33c6
commit
fbfc9ed97f
|
@ -13,6 +13,7 @@ import com.github.mikephil.charting.charts.Chart;
|
||||||
import com.github.mikephil.charting.components.LegendEntry;
|
import com.github.mikephil.charting.components.LegendEntry;
|
||||||
import com.github.mikephil.charting.components.XAxis;
|
import com.github.mikephil.charting.components.XAxis;
|
||||||
import com.github.mikephil.charting.components.YAxis;
|
import com.github.mikephil.charting.components.YAxis;
|
||||||
|
import com.github.mikephil.charting.data.CombinedData;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -117,6 +118,7 @@ public class ActivitySleepChartFragment extends AbstractChartFragment {
|
||||||
protected void updateChartsnUIThread(ChartsData chartsData) {
|
protected void updateChartsnUIThread(ChartsData chartsData) {
|
||||||
DefaultChartsData dcd = (DefaultChartsData) chartsData;
|
DefaultChartsData dcd = (DefaultChartsData) chartsData;
|
||||||
mChart.getLegend().setTextColor(LEGEND_TEXT_COLOR);
|
mChart.getLegend().setTextColor(LEGEND_TEXT_COLOR);
|
||||||
|
mChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
|
||||||
mChart.setData(dcd.getCombinedData());
|
mChart.setData(dcd.getCombinedData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,6 +99,7 @@ public class SleepChartFragment extends AbstractChartFragment {
|
||||||
mSleepAmountChart.setCenterText(mcd.getPieData().getTotalSleep());
|
mSleepAmountChart.setCenterText(mcd.getPieData().getTotalSleep());
|
||||||
mSleepAmountChart.setData(mcd.getPieData().getPieData());
|
mSleepAmountChart.setData(mcd.getPieData().getPieData());
|
||||||
|
|
||||||
|
mActivityChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
|
||||||
mActivityChart.setData(mcd.getChartsData().getCombinedData());
|
mActivityChart.setData(mcd.getChartsData().getCombinedData());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class WeekStepsChartFragment extends AbstractChartFragment {
|
||||||
mTodayStepsChart.setCenterText(NumberFormat.getNumberInstance(mLocale).format(mcd.getDaySteps().totalSteps));
|
mTodayStepsChart.setCenterText(NumberFormat.getNumberInstance(mLocale).format(mcd.getDaySteps().totalSteps));
|
||||||
mTodayStepsChart.setData(mcd.getDaySteps().data);
|
mTodayStepsChart.setData(mcd.getDaySteps().data);
|
||||||
|
|
||||||
|
mWeekStepsChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
|
||||||
mWeekStepsChart.setData(mcd.getWeekBeforeStepsData().getCombinedData());
|
mWeekStepsChart.setData(mcd.getWeekBeforeStepsData().getCombinedData());
|
||||||
mWeekStepsChart.getLegend().setEnabled(false);
|
mWeekStepsChart.getLegend().setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue