Fix VO2 gauge: large-arc-flag must always be 0 for a 180° gauge
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:
@@ -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)}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user