فهرست منبع

readd rulemarks to avoid problem with displaying graph

polscm32 2 سال پیش
والد
کامیت
cc5b557f08
1فایلهای تغییر یافته به همراه28 افزوده شده و 0 حذف شده
  1. 28 0
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView2.swift

+ 28 - 0
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView2.swift

@@ -165,6 +165,20 @@ extension MainChartView2 {
                         unit: .second
                     )
                 ).lineStyle(.init(lineWidth: 1, dash: [2]))
+                RuleMark(
+                    x: .value(
+                        "",
+                        startMarker,
+                        unit: .second
+                    )
+                ).foregroundStyle(Color.clear)
+                RuleMark(
+                    x: .value(
+                        "",
+                        endMarker,
+                        unit: .second
+                    )
+                ).foregroundStyle(Color.clear)
                 ForEach(ChartCarbs, id: \.self) { carb in
                     let carbAmount = carb.amount
                     PointMark(
@@ -334,6 +348,20 @@ extension MainChartView2 {
                         unit: .second
                     )
                 ).lineStyle(.init(lineWidth: 1, dash: [2]))
+                RuleMark(
+                    x: .value(
+                        "",
+                        startMarker,
+                        unit: .second
+                    )
+                ).foregroundStyle(Color.clear)
+                RuleMark(
+                    x: .value(
+                        "",
+                        endMarker,
+                        unit: .second
+                    )
+                ).foregroundStyle(Color.clear)
                 ForEach(TempBasals) {
                     BarMark(
                         x: .value("Time", $0.timestamp),