Explorar o código

axis label font sizes

polscm32 aka Marvout hai 1 ano
pai
achega
38e1b08908

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

@@ -288,6 +288,7 @@ struct BolusStatsView: View {
                 if let amount = value.as(Double.self) {
                     AxisValueLabel {
                         Text(amount.formatted(.number.precision(.fractionLength(0))) + " U")
+                            .font(.subheadline)
                     }
                     AxisGridLine()
                 }
@@ -303,21 +304,25 @@ struct BolusStatsView: View {
                     case .Day:
                         if hour % 6 == 0 { // Show only every 6 hours
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Month:
                         if day % 5 == 0 { // Only show every 5th day
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Total:
                         // Only show January, April, July, October
                         if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     default:
                         AxisValueLabel(format: dateFormat, centered: true)
+                            .font(.subheadline)
                         AxisGridLine()
                     }
                 }

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

@@ -341,6 +341,7 @@ struct MealStatsView: View {
                 if let amount = value.as(Double.self) {
                     AxisValueLabel {
                         Text(amount.formatted(.number.precision(.fractionLength(0))) + " g")
+                            .font(.subheadline)
                     }
                     AxisGridLine()
                 }
@@ -356,20 +357,24 @@ struct MealStatsView: View {
                     case .Day:
                         if hour % 6 == 0 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Month:
                         if day % 5 == 0 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Total:
                         if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     default:
                         AxisValueLabel(format: dateFormat, centered: true)
+                            .font(.subheadline)
                         AxisGridLine()
                     }
                 }

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

@@ -220,6 +220,7 @@ struct TDDChartView: View {
                 if let amount = value.as(Double.self) {
                     AxisValueLabel {
                         Text(amount.formatted(.number.precision(.fractionLength(0))) + " U")
+                            .font(.subheadline)
                     }
                     AxisGridLine()
                 }
@@ -235,20 +236,24 @@ struct TDDChartView: View {
                     case .Day:
                         if hour % 6 == 0 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Month:
                         if day % 5 == 0 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     case .Total:
                         if day == 1 && Calendar.current.component(.month, from: date) % 3 == 1 {
                             AxisValueLabel(format: dateFormat, centered: true)
+                                .font(.subheadline)
                             AxisGridLine()
                         }
                     default:
                         AxisValueLabel(format: dateFormat, centered: true)
+                            .font(.subheadline)
                         AxisGridLine()
                     }
                 }