Data table compact hours 1h, 2h, 3h or 4h. Calc max/min or average
This commit is contained in:
fraxle
2026-06-02 23:31:14 +01:00
parent 7b603867dd
commit 5a03077d9e
5 changed files with 147 additions and 11 deletions
+5 -2
View File
@@ -67,9 +67,12 @@ export function getCellTagEvents(events, row) {
if (ev.type === 'promo') return false;
if (ev.nightOnly && row.elev >= -5) return false;
if (ev.id === 'heat-spike' && row.elev < 0) return false;
// Sunset/sunrise events: only show icon during the actual twilight window
// Sunset/sunrise events: only show icon during the actual twilight window.
// For bucketed table rows the span is [row.iso .. row.isoEnd]; show the
// icon if the event window overlaps that span at all.
if (ev.isoRange) {
if (row.iso < ev.isoRange[0] || row.iso > ev.isoRange[1]) return false;
const hi = row.isoEnd || row.iso;
if (hi < ev.isoRange[0] || row.iso > ev.isoRange[1]) return false;
}
return true;
});