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:
+6
-2
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user