HRV: plot Garmin overnight avg (weeklyAvg) not last-night; dedupe chart tooltips
This commit is contained in:
@@ -30,7 +30,7 @@ const STAT_DEFS = {
|
||||
stat_resting_hr: { label: 'Resting HR', accent: 'red', val: h => formatHeartRate(h.resting_hr) },
|
||||
stat_sleep: { label: 'Sleep', accent: 'default', val: h => formatSleep(h.sleep_duration_s) },
|
||||
stat_vo2max: { label: 'VO₂ max', accent: 'blue', val: h => h.vo2max != null ? h.vo2max.toFixed(1) : '--', sub: h => h.fitness_age != null ? `fitness age ${h.fitness_age}` : undefined },
|
||||
stat_hrv: { label: 'HRV status', accent: 'purple', val: h => h.hrv_nightly_avg != null ? `${Math.round(h.hrv_nightly_avg)} ms` : '--', sub: h => h.hrv_status ? <HrvBadge status={h.hrv_status} /> : undefined },
|
||||
stat_hrv: { label: 'HRV status', accent: 'purple', val: h => (h.hrv_weekly_avg ?? h.hrv_nightly_avg) != null ? `${Math.round(h.hrv_weekly_avg ?? h.hrv_nightly_avg)} ms` : '--', sub: h => h.hrv_status ? <HrvBadge status={h.hrv_status} /> : undefined },
|
||||
stat_running: { label: 'Running this year', accent: 'blue', val: (h, y) => y ? `${y.running_km.toFixed(0)} km` : '--' },
|
||||
stat_cycling: { label: 'Cycling this year', accent: 'orange', val: (h, y) => y ? `${y.cycling_km.toFixed(0)} km` : '--' },
|
||||
stat_stress: { label: 'Stress', accent: 'purple', val: h => h.avg_stress != null ? Math.round(h.avg_stress) : '--' },
|
||||
@@ -480,6 +480,7 @@ export default function DashboardPage() {
|
||||
sleep_awake_s: latest.sleep_awake_s ?? null,
|
||||
sleep_score: pick('sleep_score'),
|
||||
hrv_nightly_avg: pick('hrv_nightly_avg'),
|
||||
hrv_weekly_avg: pick('hrv_weekly_avg'),
|
||||
hrv_status: pick('hrv_status'),
|
||||
steps: pick('steps'),
|
||||
vo2max: pick('vo2max'),
|
||||
|
||||
Reference in New Issue
Block a user