|
|
@@ -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()
|
|
|
}
|
|
|
}
|