We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5db1eb5 commit e1c3886Copy full SHA for e1c3886
WatchApp Extension/Scenes/GlucoseChartScene.swift
@@ -61,10 +61,10 @@ struct Scaler {
61
return CGPoint(x: CGFloat(x.timeIntervalSince(startDate)) * xScale, y: CGFloat(y - glucoseMin) * yScale)
62
}
63
64
+ // By default enforce a minimum height so that the range is visible
65
func rect(for range: WatchDatedRange, minHeight: CGFloat = 2) -> CGRect {
66
let a = point(range.startDate, range.minValue)
67
let b = point(range.endDate, range.maxValue)
- // Enforce a minimum height so that narrow target ranges still show up:
68
let size = CGSize(width: b.x - a.x, height: max(b.y - a.y, minHeight))
69
return CGRect(origin: CGPoint(x: a.x + size.width / 2, y: a.y + size.height / 2), size: size)
70
0 commit comments