diff options
author | Arseniy Movshev <dodoradio@outlook.com> | 2023-06-30 22:59:58 +0100 |
---|---|---|
committer | Arseniy Movshev <dodoradio@outlook.com> | 2023-06-30 22:59:58 +0100 |
commit | 4f86486364011a7693ff621d1529270be3b0cc84 (patch) | |
tree | 9f9ebfae54e3ced43380eb4206e8dec348ffded0 | |
parent | 5b6a4f6e10af0d7ece7ef3fd8dabb70e346de7f5 (diff) |
Reduce the number of divisions if BPM goes over 100
Diffstat (limited to '')
-rw-r--r-- | src/graphs/HrGraph.qml | 2 |
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 |