From e7c5ed6a50600aa6d060de20a39c3d0e80b6dc04 Mon Sep 17 00:00:00 2001 From: dodoradio Date: Thu, 20 Jul 2023 17:27:25 +0100 Subject: Add start and end values for HrGraph --- src/graphs/HrGraph.qml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/graphs/HrGraph.qml b/src/graphs/HrGraph.qml index 0ea5cce..a3627af 100644 --- a/src/graphs/HrGraph.qml +++ b/src/graphs/HrGraph.qml @@ -24,9 +24,14 @@ import org.asteroid.sensorlogd 1.0 Item { id: graph + property date startTime: new Date() + property date endTime: new Date() + + onStartTimeChanged: hrGraph.loadGraphData(hrDataLoader.getDataFromTo(startTime,endTime)) + onEndTimeChanged: hrGraph.loadGraphData(hrDataLoader.getDataFromTo(startTime,endTime)) Component.onCompleted: { - hrGraph.loadGraphData(hrDataLoader.getTodayData()) + hrGraph.loadGraphData(hrDataLoader.getDataFromTo(startTime,endTime)) } HrDataLoader { id: hrDataLoader } VerticalLabels { // labels column -- cgit v1.2.3-70-g09d2