2019-02-13 20:43:30 +01:00
|
|
|
/* Copyright (C) 2015-2019 0nse, Andreas Shimokawa, Carsten Pfeiffer,
|
|
|
|
Daniele Gobbetti, Dikay900, Pavel Elagin
|
2017-03-10 14:53:19 +01:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2015-08-03 23:09:49 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.activities.charts;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Intent;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
2018-08-16 16:59:56 +02:00
|
|
|
import android.widget.TextView;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
2015-08-03 01:17:02 +02:00
|
|
|
import com.github.mikephil.charting.animation.Easing;
|
2015-07-14 00:29:32 +02:00
|
|
|
import com.github.mikephil.charting.charts.Chart;
|
2017-11-01 17:34:46 +01:00
|
|
|
import com.github.mikephil.charting.charts.LineChart;
|
2015-07-14 00:29:32 +02:00
|
|
|
import com.github.mikephil.charting.charts.PieChart;
|
2016-09-18 23:37:41 +02:00
|
|
|
import com.github.mikephil.charting.components.LegendEntry;
|
2015-06-23 23:03:05 +02:00
|
|
|
import com.github.mikephil.charting.components.XAxis;
|
|
|
|
import com.github.mikephil.charting.components.YAxis;
|
2017-11-01 17:34:46 +01:00
|
|
|
import com.github.mikephil.charting.data.LineData;
|
2015-07-14 00:29:32 +02:00
|
|
|
import com.github.mikephil.charting.data.PieData;
|
|
|
|
import com.github.mikephil.charting.data.PieDataSet;
|
2016-09-18 23:37:41 +02:00
|
|
|
import com.github.mikephil.charting.data.PieEntry;
|
2019-08-24 12:41:26 +02:00
|
|
|
import com.github.mikephil.charting.formatter.ValueFormatter;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
2019-09-17 00:47:10 +02:00
|
|
|
import java.util.Arrays;
|
|
|
|
import java.util.Collections;
|
2015-06-23 23:03:05 +02:00
|
|
|
import java.util.List;
|
2015-07-20 23:11:16 +02:00
|
|
|
import java.util.concurrent.TimeUnit;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.R;
|
2016-04-12 23:12:15 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.activities.HeartRateUtils;
|
2019-09-17 00:47:10 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.activities.charts.SleepAnalysis.SleepSession;
|
2015-08-17 02:22:16 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.database.DBHandler;
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
2015-08-03 23:09:49 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityAmount;
|
2015-11-09 23:52:00 +01:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
2015-07-27 23:49:53 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
2015-08-17 02:22:16 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.util.DateTimeUtils;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
|
2015-07-11 00:03:41 +02:00
|
|
|
public class SleepChartFragment extends AbstractChartFragment {
|
|
|
|
protected static final Logger LOG = LoggerFactory.getLogger(ActivitySleepChartFragment.class);
|
2015-06-23 23:03:05 +02:00
|
|
|
|
2017-11-01 17:34:46 +01:00
|
|
|
private LineChart mActivityChart;
|
2015-07-14 00:29:32 +02:00
|
|
|
private PieChart mSleepAmountChart;
|
2018-08-16 16:59:56 +02:00
|
|
|
private TextView mSleepchartInfo;
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
private int mSmartAlarmFrom = -1;
|
|
|
|
private int mSmartAlarmTo = -1;
|
|
|
|
private int mTimestampFrom = -1;
|
|
|
|
private int mSmartAlarmGoneOff = -1;
|
|
|
|
|
2015-08-03 01:17:02 +02:00
|
|
|
@Override
|
2016-04-11 23:18:12 +02:00
|
|
|
protected ChartsData refreshInBackground(ChartsHost chartsHost, DBHandler db, GBDevice device) {
|
2016-05-16 23:36:54 +02:00
|
|
|
List<? extends ActivitySample> samples = getSamples(db, device);
|
2015-07-14 00:29:32 +02:00
|
|
|
|
2016-04-11 23:18:12 +02:00
|
|
|
MySleepChartsData mySleepChartsData = refreshSleepAmounts(device, samples);
|
|
|
|
DefaultChartsData chartsData = refresh(device, samples);
|
|
|
|
|
|
|
|
return new MyChartsData(mySleepChartsData, chartsData);
|
2015-07-14 00:29:32 +02:00
|
|
|
}
|
|
|
|
|
2016-05-16 23:36:54 +02:00
|
|
|
private MySleepChartsData refreshSleepAmounts(GBDevice mGBDevice, List<? extends ActivitySample> samples) {
|
2019-09-17 00:47:10 +02:00
|
|
|
SleepAnalysis sleepAnalysis = new SleepAnalysis();
|
|
|
|
List<SleepSession> sleepSessions = sleepAnalysis.calculateSleepSessions(samples);
|
|
|
|
|
2015-07-14 00:29:32 +02:00
|
|
|
PieData data = new PieData();
|
2019-09-17 00:47:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
final long lightSleepDuration = calculateLightSleepDuration(sleepSessions);
|
|
|
|
final long deepSleepDuration = calculateDeepSleepDuration(sleepSessions);
|
|
|
|
|
|
|
|
final long totalSeconds = lightSleepDuration + deepSleepDuration;
|
|
|
|
|
|
|
|
final List<PieEntry> entries;
|
|
|
|
final List<Integer> colors;
|
|
|
|
|
|
|
|
if (sleepSessions.isEmpty()) {
|
|
|
|
entries = Collections.emptyList();
|
|
|
|
colors = Collections.emptyList();
|
|
|
|
} else {
|
|
|
|
entries = Arrays.asList(
|
|
|
|
new PieEntry(lightSleepDuration, getActivity().getString(R.string.abstract_chart_fragment_kind_light_sleep)),
|
|
|
|
new PieEntry(deepSleepDuration, getActivity().getString(R.string.abstract_chart_fragment_kind_deep_sleep))
|
|
|
|
);
|
|
|
|
colors = Arrays.asList(
|
|
|
|
getColorFor(ActivityKind.TYPE_LIGHT_SLEEP),
|
|
|
|
getColorFor(ActivityKind.TYPE_DEEP_SLEEP)
|
|
|
|
);
|
2015-07-14 00:29:32 +02:00
|
|
|
}
|
2019-09-17 00:47:10 +02:00
|
|
|
|
|
|
|
|
2015-11-09 23:52:00 +01:00
|
|
|
String totalSleep = DateTimeUtils.formatDurationHoursMinutes(totalSeconds, TimeUnit.SECONDS);
|
2015-07-20 23:11:16 +02:00
|
|
|
PieDataSet set = new PieDataSet(entries, "");
|
2019-08-24 12:41:26 +02:00
|
|
|
set.setValueFormatter(new ValueFormatter() {
|
2015-07-20 23:11:16 +02:00
|
|
|
@Override
|
2019-08-24 12:55:33 +02:00
|
|
|
public String getFormattedValue(float value) {
|
2015-08-17 02:22:16 +02:00
|
|
|
return DateTimeUtils.formatDurationHoursMinutes((long) value, TimeUnit.SECONDS);
|
2015-07-20 23:11:16 +02:00
|
|
|
}
|
|
|
|
});
|
2015-07-14 00:29:32 +02:00
|
|
|
set.setColors(colors);
|
2017-04-05 00:08:17 +02:00
|
|
|
set.setValueTextColor(DESCRIPTION_COLOR);
|
|
|
|
set.setValueTextSize(13f);
|
|
|
|
set.setXValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
|
|
|
set.setYValuePosition(PieDataSet.ValuePosition.OUTSIDE_SLICE);
|
2015-07-14 00:29:32 +02:00
|
|
|
data.setDataSet(set);
|
|
|
|
|
2015-07-21 21:24:35 +02:00
|
|
|
//setupLegend(pieChart);
|
2019-09-17 00:47:10 +02:00
|
|
|
return new MySleepChartsData(totalSleep, data, sleepSessions);
|
|
|
|
}
|
|
|
|
|
|
|
|
private long calculateLightSleepDuration(List<SleepSession> sleepSessions) {
|
|
|
|
long result = 0;
|
|
|
|
for (SleepSession sleepSession : sleepSessions) {
|
|
|
|
result += sleepSession.getLightSleepDuration();
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
private long calculateDeepSleepDuration(List<SleepSession> sleepSessions) {
|
|
|
|
long result = 0;
|
|
|
|
for (SleepSession sleepSession : sleepSessions) {
|
|
|
|
result += sleepSession.getDeepSleepDuration();
|
|
|
|
}
|
|
|
|
return result;
|
2016-04-11 23:18:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void updateChartsnUIThread(ChartsData chartsData) {
|
|
|
|
MyChartsData mcd = (MyChartsData) chartsData;
|
2019-09-17 00:47:10 +02:00
|
|
|
MySleepChartsData pieData = mcd.getPieData();
|
|
|
|
mSleepAmountChart.setCenterText(pieData.getTotalSleep());
|
|
|
|
mSleepAmountChart.setData(pieData.getPieData());
|
2016-04-11 23:18:12 +02:00
|
|
|
|
2016-09-29 22:16:08 +02:00
|
|
|
mActivityChart.setData(null); // workaround for https://github.com/PhilJay/MPAndroidChart/issues/2317
|
2016-10-03 21:06:18 +02:00
|
|
|
mActivityChart.getXAxis().setValueFormatter(mcd.getChartsData().getXValueFormatter());
|
2016-10-07 21:46:00 +02:00
|
|
|
mActivityChart.setData(mcd.getChartsData().getData());
|
2018-08-16 16:59:56 +02:00
|
|
|
|
2019-09-17 00:47:10 +02:00
|
|
|
|
|
|
|
mSleepchartInfo.setText(buildYouSleptText(pieData));
|
|
|
|
}
|
|
|
|
|
|
|
|
private String buildYouSleptText(MySleepChartsData pieData) {
|
|
|
|
final StringBuilder result = new StringBuilder();
|
|
|
|
if (pieData.getSleepSessions().isEmpty()) {
|
|
|
|
result.append(getContext().getString(R.string.you_did_not_sleep));
|
2018-08-16 16:59:56 +02:00
|
|
|
} else {
|
2019-09-17 00:47:10 +02:00
|
|
|
for (SleepSession sleepSession : pieData.getSleepSessions()) {
|
|
|
|
result.append(getContext().getString(
|
|
|
|
R.string.you_slept,
|
|
|
|
DateTimeUtils.timeToString(sleepSession.getSleepStart()),
|
|
|
|
DateTimeUtils.timeToString(sleepSession.getSleepEnd())));
|
|
|
|
result.append('\n');
|
|
|
|
}
|
2018-08-16 16:59:56 +02:00
|
|
|
}
|
2019-09-17 00:47:10 +02:00
|
|
|
return result.toString();
|
2015-07-14 00:29:32 +02:00
|
|
|
}
|
|
|
|
|
2015-08-25 00:33:37 +02:00
|
|
|
@Override
|
|
|
|
public String getTitle() {
|
|
|
|
return getString(R.string.sleepchart_your_sleep);
|
|
|
|
}
|
|
|
|
|
2015-06-23 23:03:05 +02:00
|
|
|
@Override
|
|
|
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
|
|
|
Bundle savedInstanceState) {
|
2015-07-14 00:29:32 +02:00
|
|
|
View rootView = inflater.inflate(R.layout.fragment_sleepchart, container, false);
|
2015-06-23 23:03:05 +02:00
|
|
|
|
2018-08-16 23:53:54 +02:00
|
|
|
mActivityChart = rootView.findViewById(R.id.sleepchart);
|
|
|
|
mSleepAmountChart = rootView.findViewById(R.id.sleepchart_pie_light_deep);
|
|
|
|
mSleepchartInfo = rootView.findViewById(R.id.sleepchart_info);
|
2015-07-14 00:29:32 +02:00
|
|
|
|
|
|
|
setupActivityChart();
|
|
|
|
setupSleepAmountChart();
|
2015-06-23 23:03:05 +02:00
|
|
|
|
2015-08-25 01:03:58 +02:00
|
|
|
// refresh immediately instead of use refreshIfVisible(), for perceived performance
|
2015-07-14 00:29:32 +02:00
|
|
|
refresh();
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
return rootView;
|
|
|
|
}
|
|
|
|
|
2015-08-17 02:22:16 +02:00
|
|
|
@Override
|
|
|
|
public void onReceive(Context context, Intent intent) {
|
|
|
|
String action = intent.getAction();
|
|
|
|
if (action.equals(ChartsHost.REFRESH)) {
|
|
|
|
// TODO: use LimitLines to visualize smart alarms?
|
|
|
|
mSmartAlarmFrom = intent.getIntExtra("smartalarm_from", -1);
|
|
|
|
mSmartAlarmTo = intent.getIntExtra("smartalarm_to", -1);
|
|
|
|
mTimestampFrom = intent.getIntExtra("recording_base_timestamp", -1);
|
|
|
|
mSmartAlarmGoneOff = intent.getIntExtra("alarm_gone_off", -1);
|
|
|
|
refresh();
|
|
|
|
} else {
|
|
|
|
super.onReceive(context, intent);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-14 00:29:32 +02:00
|
|
|
private void setupSleepAmountChart() {
|
|
|
|
mSleepAmountChart.setBackgroundColor(BACKGROUND_COLOR);
|
2016-09-18 23:37:41 +02:00
|
|
|
mSleepAmountChart.getDescription().setTextColor(DESCRIPTION_COLOR);
|
2017-04-08 15:50:13 +02:00
|
|
|
mSleepAmountChart.setEntryLabelColor(DESCRIPTION_COLOR);
|
2016-09-18 23:37:41 +02:00
|
|
|
mSleepAmountChart.getDescription().setText("");
|
|
|
|
// mSleepAmountChart.getDescription().setNoDataTextDescription("");
|
2015-07-20 23:11:16 +02:00
|
|
|
mSleepAmountChart.setNoDataText("");
|
2016-04-11 23:18:12 +02:00
|
|
|
mSleepAmountChart.getLegend().setEnabled(false);
|
2015-07-14 00:29:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private void setupActivityChart() {
|
|
|
|
mActivityChart.setBackgroundColor(BACKGROUND_COLOR);
|
2016-09-18 23:37:41 +02:00
|
|
|
mActivityChart.getDescription().setTextColor(DESCRIPTION_COLOR);
|
2015-07-14 00:29:32 +02:00
|
|
|
configureBarLineChartDefaults(mActivityChart);
|
|
|
|
|
|
|
|
XAxis x = mActivityChart.getXAxis();
|
2015-06-23 23:03:05 +02:00
|
|
|
x.setDrawLabels(true);
|
|
|
|
x.setDrawGridLines(false);
|
|
|
|
x.setEnabled(true);
|
2015-07-11 00:03:41 +02:00
|
|
|
x.setTextColor(CHART_TEXT_COLOR);
|
2015-06-23 23:03:05 +02:00
|
|
|
x.setDrawLimitLinesBehindData(true);
|
|
|
|
|
2015-07-14 00:29:32 +02:00
|
|
|
YAxis y = mActivityChart.getAxisLeft();
|
2015-06-23 23:03:05 +02:00
|
|
|
y.setDrawGridLines(false);
|
|
|
|
// y.setDrawLabels(false);
|
|
|
|
// TODO: make fixed max value optional
|
2016-10-04 00:09:56 +02:00
|
|
|
y.setAxisMaximum(1f);
|
|
|
|
y.setAxisMinimum(0);
|
2015-06-23 23:03:05 +02:00
|
|
|
y.setDrawTopYLabelEntry(false);
|
2015-07-11 00:03:41 +02:00
|
|
|
y.setTextColor(CHART_TEXT_COLOR);
|
2015-06-23 23:03:05 +02:00
|
|
|
|
|
|
|
// y.setLabelCount(5);
|
|
|
|
y.setEnabled(true);
|
|
|
|
|
2015-07-14 00:29:32 +02:00
|
|
|
YAxis yAxisRight = mActivityChart.getAxisRight();
|
2015-06-23 23:03:05 +02:00
|
|
|
yAxisRight.setDrawGridLines(false);
|
2016-06-19 23:22:28 +02:00
|
|
|
yAxisRight.setEnabled(supportsHeartrate(getChartsHost().getDevice()));
|
2016-04-04 23:05:00 +02:00
|
|
|
yAxisRight.setDrawLabels(true);
|
|
|
|
yAxisRight.setDrawTopYLabelEntry(true);
|
2015-07-11 00:03:41 +02:00
|
|
|
yAxisRight.setTextColor(CHART_TEXT_COLOR);
|
2018-08-16 13:13:12 +02:00
|
|
|
yAxisRight.setAxisMaxValue(HeartRateUtils.getInstance().getMaxHeartRate());
|
|
|
|
yAxisRight.setAxisMinValue(HeartRateUtils.getInstance().getMinHeartRate());
|
2015-06-23 23:03:05 +02:00
|
|
|
}
|
|
|
|
|
2016-09-18 23:37:41 +02:00
|
|
|
@Override
|
2015-07-14 00:29:32 +02:00
|
|
|
protected void setupLegend(Chart chart) {
|
2016-09-18 23:37:41 +02:00
|
|
|
List<LegendEntry> 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);
|
|
|
|
|
2016-06-19 23:22:28 +02:00
|
|
|
if (supportsHeartrate(getChartsHost().getDevice())) {
|
2016-09-18 23:37:41 +02:00
|
|
|
LegendEntry hrEntry = new LegendEntry();
|
|
|
|
hrEntry.label = HEARTRATE_LABEL;
|
|
|
|
hrEntry.formColor = HEARTRATE_COLOR;
|
|
|
|
legendEntries.add(hrEntry);
|
2016-04-04 23:05:00 +02:00
|
|
|
}
|
2016-09-18 23:37:41 +02:00
|
|
|
chart.getLegend().setCustom(legendEntries);
|
2015-07-14 00:29:32 +02:00
|
|
|
chart.getLegend().setTextColor(LEGEND_TEXT_COLOR);
|
2015-06-23 23:03:05 +02:00
|
|
|
}
|
2015-07-13 21:54:46 +02:00
|
|
|
|
|
|
|
@Override
|
2016-05-16 23:36:54 +02:00
|
|
|
protected List<? extends ActivitySample> getSamples(DBHandler db, GBDevice device, int tsFrom, int tsTo) {
|
2015-11-09 23:52:00 +01:00
|
|
|
// temporary fix for totally wrong sleep amounts
|
|
|
|
// return super.getSleepSamples(db, device, tsFrom, tsTo);
|
|
|
|
return super.getAllSamples(db, device, tsFrom, tsTo);
|
2015-08-03 01:17:02 +02:00
|
|
|
}
|
|
|
|
|
2016-09-18 23:37:41 +02:00
|
|
|
@Override
|
2015-08-03 01:17:02 +02:00
|
|
|
protected void renderCharts() {
|
2019-08-24 12:41:26 +02:00
|
|
|
mActivityChart.animateX(ANIM_TIME, Easing.EaseInOutQuart);
|
2015-08-03 01:17:02 +02:00
|
|
|
mSleepAmountChart.invalidate();
|
2015-07-13 21:54:46 +02:00
|
|
|
}
|
2016-04-11 23:18:12 +02:00
|
|
|
|
|
|
|
private static class MySleepChartsData extends ChartsData {
|
|
|
|
private String totalSleep;
|
|
|
|
private final PieData pieData;
|
2019-09-17 00:47:10 +02:00
|
|
|
private final List<SleepSession> sleepSessions;
|
2016-04-11 23:18:12 +02:00
|
|
|
|
2019-09-17 00:47:10 +02:00
|
|
|
public MySleepChartsData(String totalSleep, PieData pieData, List<SleepSession> sleepSessions) {
|
2016-04-11 23:18:12 +02:00
|
|
|
this.totalSleep = totalSleep;
|
|
|
|
this.pieData = pieData;
|
2019-09-17 00:47:10 +02:00
|
|
|
this.sleepSessions = sleepSessions;
|
2016-04-11 23:18:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public PieData getPieData() {
|
|
|
|
return pieData;
|
|
|
|
}
|
|
|
|
|
|
|
|
public CharSequence getTotalSleep() {
|
|
|
|
return totalSleep;
|
|
|
|
}
|
2018-08-16 16:59:56 +02:00
|
|
|
|
2019-09-17 00:47:10 +02:00
|
|
|
public List<SleepSession> getSleepSessions() {
|
|
|
|
return sleepSessions;
|
2018-08-16 16:59:56 +02:00
|
|
|
}
|
2016-04-11 23:18:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
private static class MyChartsData extends ChartsData {
|
2017-11-01 17:34:46 +01:00
|
|
|
private final DefaultChartsData<LineData> chartsData;
|
2016-04-11 23:18:12 +02:00
|
|
|
private final MySleepChartsData pieData;
|
|
|
|
|
2017-11-01 17:34:46 +01:00
|
|
|
public MyChartsData(MySleepChartsData pieData, DefaultChartsData<LineData> chartsData) {
|
2016-04-11 23:18:12 +02:00
|
|
|
this.pieData = pieData;
|
|
|
|
this.chartsData = chartsData;
|
|
|
|
}
|
|
|
|
|
|
|
|
public MySleepChartsData getPieData() {
|
|
|
|
return pieData;
|
|
|
|
}
|
|
|
|
|
2017-11-01 17:34:46 +01:00
|
|
|
public DefaultChartsData<LineData> getChartsData() {
|
2016-04-11 23:18:12 +02:00
|
|
|
return chartsData;
|
|
|
|
}
|
|
|
|
}
|
2015-08-03 01:17:02 +02:00
|
|
|
}
|