Fix VO2 gauge: large-arc-flag must always be 0 for a 180° gauge
Build and push images / validate (push) Successful in 2s
Build and push images / build-backend (push) Successful in 5s
Build and push images / build-worker (push) Successful in 4s
Build and push images / build-frontend (push) Successful in 9s

Segments covering >50% of the gauge range were getting large=1, causing
the SVG to draw a 234°+ arc going the wrong way around, producing a
spurious lobe on the right side of the widget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 00:56:46 +01:00
parent 5c5877c792
commit b6f185d5e8
+1 -1
View File
@@ -75,7 +75,7 @@ function Vo2MaxGauge({ value, birthYear, biologicalSex }) {
const arc = (v1, v2, radius = r) => {
const [x1, y1] = toXY(v1, radius)
const [x2, y2] = toXY(v2, radius)
const large = (v2 - v1) / (MAX - MIN) > 0.5 ? 1 : 0
const large = 0 // gauge spans 180°, so no segment ever exceeds 180°
return `M ${x1.toFixed(2)} ${y1.toFixed(2)} A ${radius} ${radius} 0 ${large} 1 ${x2.toFixed(2)} ${y2.toFixed(2)}`
}