summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseniy Movshev <dodoradio@outlook.com>2023-06-30 22:59:58 +0100
committerArseniy Movshev <dodoradio@outlook.com>2023-06-30 22:59:58 +0100
commit4f86486364011a7693ff621d1529270be3b0cc84 (patch)
tree9f9ebfae54e3ced43380eb4206e8dec348ffded0
parent5b6a4f6e10af0d7ece7ef3fd8dabb70e346de7f5 (diff)
Reduce the number of divisions if BPM goes over 100
-rw-r--r--src/graphs/HrGraph.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphs/HrGraph.qml b/src/graphs/HrGraph.qml
index de8b2fd..84a408e 100644
--- a/src/graphs/HrGraph.qml
+++ b/src/graphs/HrGraph.qml
@@ -46,7 +46,7 @@ Item {
hrGraph.loadGraphData(hrDataLoader.getTodayData())
console.log("minValue", hrGraph.minValue, "maxValue",hrGraph.maxValue)
//values divisions
- valueDivisionsInterval = (valuesDelta) >= 50 ? 10 : 5
+ valueDivisionsInterval = valuesDelta >= 50 ? (valuesDelta >= 100 ? 20: 10) : 5
valueDivisionsCount = hrGraph.relativeMode ? (Math.ceil(hrGraph.maxValue/valueDivisionsInterval)) - (Math.ceil(hrGraph.minValue/valueDivisionsInterval)) : Math.ceil(hrGraph.maxValue/valueDivisionsInterval) + 1
startValueDivision = hrGraph.relativeMode ? Math.ceil(hrGraph.minValue/valueDivisionsInterval)*valueDivisionsInterval : 0
//times divisions