Calendar totals strip: wider bars, 0.1%-precision small shares (#5)

Widen the per-category deviation bars (3px→10px) so each reads
clearly, and print sub-1% shares as e.g. "0.4%" instead of "<1%".


Claude-Session: https://claude.ai/code/session_019VP23wKmjS2ozk1g5a9g1Z

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Emi Griffith 2026-07-10 18:38:34 -07:00 committed by GitHub
parent cbef45db13
commit 27a6508b72
2 changed files with 2 additions and 2 deletions

View file

@ -678,7 +678,7 @@ function renderTotals(visible) {
}
const total = buckets.reduce((n, b) => n + b[2], 0);
const pctText = (n) => { const r = Math.round(100 * n / total); return n > 0 && r === 0 ? "<1%" : `${r}%`; };
const pctText = (n) => { const p = 100 * n / total, r = Math.round(p); return n > 0 && r === 0 ? `${p.toFixed(1)}%` : `${r}%`; };
const head = wActive
? `${days.length.toLocaleString()} of ${visible.length.toLocaleString()} shown days match the weather filter — by ${title}:`
: `${visible.length.toLocaleString()} days shown — by ${title}:`;

View file

@ -754,7 +754,7 @@ main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 60px; }
.ct-num-zero { font-weight: 600; opacity: .38; }
.ct-line {
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
width: 3px; border-radius: 2px 2px 0 0; background: var(--c);
width: 10px; border-radius: 3px 3px 0 0; background: var(--c);
}
.ct-col-median .ct-num { color: var(--muted); font-weight: 800; }
.ct-mid {