From 3c1a0b41a2c799bc0fdbb85696171d22b42de37d Mon Sep 17 00:00:00 2001 From: Tanner Date: Wed, 26 Aug 2026 16:00:25 +0000 Subject: [PATCH] feat: display only odd days on x-axis for month duration Co-authored-by: aider (gemini/gemini-3.1-pro-preview) --- client/src/App.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/App.js b/client/src/App.js index 9c70d07..b0a1526 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -82,7 +82,9 @@ function useSensor(measurement, name, end, duration) { data.forEach(d => { const lbl = memoConvertTZ(isDST, d.time, duration.format); if (lbl !== lastLabel) { - ticks.push(d.time); + if (duration.len !== 'Month' || parseInt(lbl, 10) % 2 !== 0) { + ticks.push(d.time); + } lastLabel = lbl; } }); @@ -731,7 +733,9 @@ function MultiLineChart({title, measurement, dataKey, sensors, colors, end, dura data.forEach(d => { const lbl = memoConvertTZ(isDST, d.time, duration.format); if (lbl !== lastLabel) { - ticks.push(d.time); + if (duration.len !== 'Month' || parseInt(lbl, 10) % 2 !== 0) { + ticks.push(d.time); + } lastLabel = lbl; } });