Explorar el Código

Fix forecast line by adding chartForegroundStyleScale miised in #291

Deniz Cengiz hace 1 año
padre
commit
c341b2bf7f

+ 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 {