aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stepCounter/StepCounterPreview.qml2
-rw-r--r--src/stepCounter/StepsDetailPage.qml2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/stepCounter/StepCounterPreview.qml b/src/stepCounter/StepCounterPreview.qml
index 89f87fd..9042dd7 100644
--- a/src/stepCounter/StepCounterPreview.qml
+++ b/src/stepCounter/StepCounterPreview.qml
@@ -85,7 +85,7 @@ MouseArea {
indicatorLineHeight: loggerSettings.stepGoalEnabled ? loggerSettings.stepGoalTarget : 0
onBarClicked: (index)=> {
var d = new Date()
- d.setDate(d.getDate() - 6 + index)
+ d.setDate(d.getDate() - valuesArr.length + 1 + index)
pageStack.push(detailPage,{"currentDay": d})
}
}
diff --git a/src/stepCounter/StepsDetailPage.qml b/src/stepCounter/StepsDetailPage.qml
index c792956..7949a2f 100644
--- a/src/stepCounter/StepsDetailPage.qml
+++ b/src/stepCounter/StepsDetailPage.qml
@@ -96,7 +96,7 @@ Item {
indicatorLineHeight: loggerSettings.stepGoalEnabled ? loggerSettings.stepGoalTarget : 0
onBarClicked: (index)=> {
var d = new Date()
- d.setDate(d.getDate() - 6 + index)
+ d.setDate(d.getDate() - valuesArr.length + 1 + index)
stepsLineGraph.startTime = d
stepsLineGraph.endTime = d
loadData()