From 376e85521792e8fda419efaaf1919e1f8626727e Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 1 Apr 2026 07:54:14 -0500 Subject: [PATCH] Show 'Best at X UTC' with peak score on forecast graph --- assets/js/propagation_map_hook.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/assets/js/propagation_map_hook.js b/assets/js/propagation_map_hook.js index 2b9bec4c..cd619f53 100644 --- a/assets/js/propagation_map_hook.js +++ b/assets/js/propagation_map_hook.js @@ -151,6 +151,11 @@ function buildForecastSvg(forecast) { else if (diff < -5) trend = `▼ Declining` else trend = `→ Steady` + // Best time + const bestPt = points.reduce((best, p) => p.score > best.score ? p : best, points[0]) + const bestUtc = `${bestPt.time.getUTCHours().toString().padStart(2, "0")}:00 UTC` + const bestTier = scoreTier(bestPt.score) + // Y-axis: score labels const yLabels = [0, 50, 100].map(s => { const y = marginT + plotH * (1 - s / 100) @@ -177,7 +182,10 @@ function buildForecastSvg(forecast) { ${xLabels} + + ${bestPt.score} +
Best at ${bestUtc} — score ${bestPt.score} (${bestTier.label})
` }