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:
+3
-2
@@ -222,13 +222,14 @@
|
||||
|
||||
<section class="patterns" data-panel="sleep-trend">
|
||||
<h2>Sleep trend</h2>
|
||||
<svg id="chart-sleep-trend" class="chart-svg" viewBox="0 0 320 160" role="img" aria-label="Cumulative sleep hours through the day: today, yesterday and the recent average"></svg>
|
||||
<svg id="chart-sleep-trend" class="chart-svg" viewBox="0 0 320 160" role="img" aria-label="Cumulative sleep hours through the day: today, yesterday, the recent average and the projected end-of-day total"></svg>
|
||||
<div class="legend">
|
||||
<span class="lg trend-today"><span class="sw"></span>Today</span>
|
||||
<span class="lg trend-projected" id="legend-trend-projected" hidden><span class="sw"></span><span id="legend-trend-projected-text">Projected</span></span>
|
||||
<span class="lg trend-yesterday" id="legend-trend-yesterday"><span class="sw"></span>Yesterday</span>
|
||||
<span class="lg trend-avg" id="legend-trend-avg"><span class="sw"></span><span id="legend-trend-avg-text">7-day avg</span></span>
|
||||
</div>
|
||||
<p class="muted-note">Hours slept so far at each point of the day, against yesterday and the average over the picked chart window.</p>
|
||||
<p class="muted-note">Hours slept so far at each point of the day, against yesterday and the average over the picked chart window. The dashed tail continues today's line the way the average day usually plays out.</p>
|
||||
</section>
|
||||
|
||||
<section class="patterns" data-panel="hour-heatmap">
|
||||
|
||||
Reference in New Issue
Block a user