From 75b372437cbdc974554c6090babbc852866d4b34 Mon Sep 17 00:00:00 2001 From: henrygd Date: Sun, 5 Oct 2025 21:18:16 -0400 Subject: [PATCH] add small end buffer to chart x axis --- internal/site/src/components/routes/system.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/site/src/components/routes/system.tsx b/internal/site/src/components/routes/system.tsx index 71cbf95b..6e7c9588 100644 --- a/internal/site/src/components/routes/system.tsx +++ b/internal/site/src/components/routes/system.tsx @@ -93,7 +93,8 @@ function getTimeData(chartTime: ChartTimes, lastCreated: number) { } } - const now = new Date() + const buffer = chartTime === "1m" ? 400 : 20_000 + const now = new Date(Date.now() + buffer) const startTime = chartTimeData[chartTime].getOffset(now) const ticks = timeTicks(startTime, now, chartTimeData[chartTime].ticks ?? 12).map((date) => date.getTime()) const data = {