Procházet zdrojové kódy

Axis value label position centered

polscm32 aka Marvout před 1 rokem
rodič
revize
7ea6fa5c8f

+ 3 - 3
FreeAPS/Sources/Modules/Stat/View/ViewElements/BolusStatsView.swift

@@ -137,17 +137,17 @@ struct BolusStatsView: View {
                         switch selectedDuration {
                         case .Month:
                             if day % 5 == 0 { // Only show every 5th day
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         case .Total:
                             // Only show January, April, July, October
                             if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         default:
-                            AxisValueLabel(format: dateFormat)
+                            AxisValueLabel(format: dateFormat, centered: true)
                             AxisGridLine()
                         }
                     }

+ 3 - 3
FreeAPS/Sources/Modules/Stat/View/ViewElements/MealStatsView.swift

@@ -137,17 +137,17 @@ struct MealStatsView: View {
                         switch selectedDuration {
                         case .Month:
                             if day % 5 == 0 { // Only show every 5th day
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         case .Total:
                             // Only show January, April, July, October
                             if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         default:
-                            AxisValueLabel(format: dateFormat)
+                            AxisValueLabel(format: dateFormat, centered: true)
                             AxisGridLine()
                         }
                     }

+ 3 - 3
FreeAPS/Sources/Modules/Stat/View/ViewElements/TDDChart.swift

@@ -145,17 +145,17 @@ struct TDDChartView: View {
                         switch selectedDuration {
                         case .Month:
                             if day % 5 == 0 { // Only show every 5th day
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         case .Total:
                             // Only show January, April, July, October
                             if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
-                                AxisValueLabel(format: dateFormat)
+                                AxisValueLabel(format: dateFormat, centered: true)
                                 AxisGridLine()
                             }
                         default:
-                            AxisValueLabel(format: dateFormat)
+                            AxisValueLabel(format: dateFormat, centered: true)
                             AxisGridLine()
                         }
                     }