Project today's end-of-day sleep total on the Sleep trend chart
A dashed tail continues today's line from now to midnight by adding the increments the N-day average curve makes over the same stretch, so the projection follows the usual daily rhythm instead of extrapolating the current rate (which overshoots right after a long night). The legend shows the projected total; with no history there's no average and no projection.
This commit is contained in:
@@ -939,7 +939,19 @@ input.switch:checked::after { transform: translateX(18px); }
|
||||
fill: none;
|
||||
opacity: 0.7;
|
||||
}
|
||||
/* Today's projected tail: same weight/color as today so it reads as its
|
||||
continuation, dashed + faded because it hasn't happened yet. */
|
||||
.chart-svg .trend-projected {
|
||||
stroke: var(--sleep);
|
||||
stroke-width: 2.5;
|
||||
stroke-dasharray: 2 4;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
fill: none;
|
||||
opacity: 0.55;
|
||||
}
|
||||
.lg.trend-today .sw { background: var(--sleep); }
|
||||
.lg.trend-projected .sw { background: color-mix(in srgb, var(--sleep) 40%, var(--surface)); }
|
||||
.lg.trend-yesterday .sw { background: var(--muted); }
|
||||
.lg.trend-avg .sw { background: color-mix(in srgb, var(--sleep) 55%, var(--surface)); }
|
||||
.lg[hidden] { display: none; }
|
||||
|
||||
Reference in New Issue
Block a user