diff options
-rw-r--r-- | src/graphs/HrGraph.qml | 4 | ||||
-rw-r--r-- | src/graphs/StepsLineGraph.qml | 4 | ||||
-rw-r--r-- | src/stepCounter/StepCounterPreview.qml | 4 | ||||
-rw-r--r-- | src/stepCounter/StepsDetailPage.qml | 1 |
4 files changed, 11 insertions, 2 deletions
diff --git a/src/graphs/HrGraph.qml b/src/graphs/HrGraph.qml index a3627af..40bd962 100644 --- a/src/graphs/HrGraph.qml +++ b/src/graphs/HrGraph.qml @@ -33,7 +33,9 @@ Item { Component.onCompleted: { hrGraph.loadGraphData(hrDataLoader.getDataFromTo(startTime,endTime)) } - HrDataLoader { id: hrDataLoader } + HrDataLoader { id: hrDataLoader + onDataChanged: hrGraph.loadGraphData(getDataFromTo(startTime,endTime)) + } VerticalLabels { // labels column id: markerParent width: parent.width/8 diff --git a/src/graphs/StepsLineGraph.qml b/src/graphs/StepsLineGraph.qml index c654901..ddfcf5f 100644 --- a/src/graphs/StepsLineGraph.qml +++ b/src/graphs/StepsLineGraph.qml @@ -33,7 +33,9 @@ Item { Component.onCompleted: { stepsGraph.loadGraphData(stepsDataLoader.getDataFromTo(startTime,endTime)) } - StepsDataLoader { id: stepsDataLoader } + StepsDataLoader { id: stepsDataLoader + onDataChanged: stepsGraph.loadGraphData(getDataFromTo(startTime,endTime)) + } VerticalLabels { // labels column id: markerParent width: parent.width/8 diff --git a/src/stepCounter/StepCounterPreview.qml b/src/stepCounter/StepCounterPreview.qml index 8ef611e..89f87fd 100644 --- a/src/stepCounter/StepCounterPreview.qml +++ b/src/stepCounter/StepCounterPreview.qml @@ -60,8 +60,12 @@ MouseArea { triggerDaemonRecording() stepsGraph.loadData() } + onDataChanged: stepsGraph.loadData() } function loadData() { + valuesArr = [] + labelsArr = [] + colorsArr = [] var currDate = new Date() currDate.setDate(currDate.getDate() - 7) for (var i = 0; i < 7; i++) { diff --git a/src/stepCounter/StepsDetailPage.qml b/src/stepCounter/StepsDetailPage.qml index 7d8dbf4..c792956 100644 --- a/src/stepCounter/StepsDetailPage.qml +++ b/src/stepCounter/StepsDetailPage.qml @@ -66,6 +66,7 @@ Item { triggerDaemonRecording() stepsGraph.loadData() } + onDataChanged: stepsGraph.loadData() } function loadData() { valuesArr = [] |