Skip to content

Commit 6f848c7

Browse files
committed
Live Activity: move preset label to top-leading so it doesn't overlap y-axis labels
The chart's y-axis labels (175/150/125/100) render on the right side of the plot, but the preset-name label (e.g. '🚴 Biking') was also at top-trailing, so they crowded the same top-right corner. Switched the ZStack alignment to .leading and updated the label padding from trailing→leading so the preset sits in the empty top-left area.
1 parent 522f8c1 commit 6f848c7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Loop Widget Extension/Live Activity/ChartView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ struct ChartView: View {
9898
}
9999

100100
var body: some View {
101-
ZStack(alignment: Alignment(horizontal: .trailing, vertical: .top)){
101+
ZStack(alignment: Alignment(horizontal: .leading, vertical: .top)){
102102
Chart {
103103
if let preset = self.preset, (preset.minValue > 0 || preset.maxValue > 0), predicatedData.count > 0, preset.endDate > Date.now.addingTimeInterval(.hours(-6)) {
104104
let (presetMin, presetMax) = adjustedRange(min: preset.minValue, max: preset.maxValue)
@@ -179,7 +179,7 @@ struct ChartView: View {
179179
}
180180
}
181181
.font(.footnote)
182-
.padding(.trailing, 5)
182+
.padding(.leading, 5)
183183
.padding(.top, 2)
184184
}
185185
}

0 commit comments

Comments
 (0)