feat: display only odd days on x-axis for month duration

Co-authored-by: aider (gemini/gemini-3.1-pro-preview) <aider@aider.chat>
This commit is contained in:
Tanner
2026-08-26 16:00:25 +00:00
co-authored by aider
parent 4ba212bb25
commit 3c1a0b41a2
+6 -2
View File
@@ -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;
}
});