From 4f86486364011a7693ff621d1529270be3b0cc84 Mon Sep 17 00:00:00 2001 From: Arseniy Movshev Date: Fri, 30 Jun 2023 22:59:58 +0100 Subject: Reduce the number of divisions if BPM goes over 100 --- src/graphs/HrGraph.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/graphs') 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 -- cgit v1.2.3-70-g09d2