浏览代码

change calculation for y axis labels

polscm32 2 年之前
父节点
当前提交
51768248af
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

+ 2 - 2
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -767,8 +767,8 @@ extension MainChartView {
 
             /// find the maximum glucose value
             if let maxGlucose = last24Hours.max(by: { $0.unfiltered ?? 0 < $1.unfiltered ?? 0 }) {
-                /// round to next 50er
-                maxYLabel = Int(50 * round(Double(maxGlucose.unfiltered ?? 0) / 50))
+                /// add  50
+                maxYLabel = Int(maxGlucose.unfiltered ?? 0 + 50)
                 print("dein wert issssssssssss")
                 print(maxYLabel)