소스 검색

Fix forecast line by adding chartForegroundStyleScale miised in #291

Deniz Cengiz 1 년 전
부모
커밋
c341b2bf7f
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      Trio/Sources/Modules/Home/View/Chart/MainChartView.swift
  2. 6 0
      Trio/Sources/Modules/Treatments/View/ForecastChart.swift

+ 6 - 0
Trio/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -202,6 +202,12 @@ extension MainChartView {
                     .asMmolL ... state.maxYAxisValue.asMmolL
             )
             .chartLegend(.hidden)
+            .chartForegroundStyleScale([
+                "iob": Color.insulin,
+                "uam": Color.uam,
+                "zt": Color.zt,
+                "cob": Color.orange
+            ])
         }
     }
 }

+ 6 - 0
Trio/Sources/Modules/Treatments/View/ForecastChart.swift

@@ -185,6 +185,12 @@ struct ForecastChart: View {
                 }.font(.caption2)
             }
         }
+        .chartForegroundStyleScale([
+            "iob": Color.insulin,
+            "uam": Color.uam,
+            "zt": Color.zt,
+            "cob": Color.orange
+        ])
     }
 
     @ViewBuilder var selectionPopover: some View {