Merge remote-tracking branch 'origin/main' into worktree-calendar-status-lines
# Conflicts: # frontend/app.js
This commit is contained in:
commit
7aeb32d135
3 changed files with 5 additions and 3 deletions
|
|
@ -596,7 +596,9 @@ function precipChart(days, n, xFor, C) {
|
||||||
days, n, xFor, C, key: "precip", color: C.precip, fan: RAIN_FAN, hasNormals: true, baseZero: true,
|
days, n, xFor, C, key: "precip", color: C.precip, fan: RAIN_FAN, hasNormals: true, baseZero: true,
|
||||||
getVal: (d) => (d.precip ? d.precip.value : null),
|
getVal: (d) => (d.precip ? d.precip.value : null),
|
||||||
getPct: (d) => (d.precip ? d.precip.percentile : null),
|
getPct: (d) => (d.precip ? d.precip.percentile : null),
|
||||||
dotColor: (d) => (d.precip && d.precip.value > 0 ? (TIER_COLORS[d.precip.class] || C.precip) : C.precip),
|
// Rain days take their intensity-tier color; no-rain days warm with the dry
|
||||||
|
// streak (tan→red) so a dry spell reads as dry, matching the Dry chart.
|
||||||
|
dotColor: (d) => (d.precip && d.precip.value > 0 ? (TIER_COLORS[d.precip.class] || C.precip) : (drynessColor(d.dsr) || C.precip)),
|
||||||
fmtAxis: (v) => `${v.toFixed(2)}"`,
|
fmtAxis: (v) => `${v.toFixed(2)}"`,
|
||||||
fmtLabel: (v) => `${v.toFixed(2)}"`,
|
fmtLabel: (v) => `${v.toFixed(2)}"`,
|
||||||
labelOn: (v) => v > 0, // only label rain days; dry days rest on the baseline
|
labelOn: (v) => v > 0, // only label rain days; dry days rest on the baseline
|
||||||
|
|
|
||||||
|
|
@ -678,7 +678,7 @@ function renderTotals(visible) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const total = buckets.reduce((n, b) => n + b[2], 0);
|
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
|
const head = wActive
|
||||||
? `${days.length.toLocaleString()} of ${visible.length.toLocaleString()} shown days match the weather filter — by ${title}:`
|
? `${days.length.toLocaleString()} of ${visible.length.toLocaleString()} shown days match the weather filter — by ${title}:`
|
||||||
: `${visible.length.toLocaleString()} days shown — by ${title}:`;
|
: `${visible.length.toLocaleString()} days shown — by ${title}:`;
|
||||||
|
|
|
||||||
|
|
@ -754,7 +754,7 @@ main { max-width: 1200px; margin: 0 auto; padding: 20px 24px 60px; }
|
||||||
.ct-num-zero { font-weight: 600; opacity: .38; }
|
.ct-num-zero { font-weight: 600; opacity: .38; }
|
||||||
.ct-line {
|
.ct-line {
|
||||||
position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
|
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-col-median .ct-num { color: var(--muted); font-weight: 800; }
|
||||||
.ct-mid {
|
.ct-mid {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue