From 0e3cfb280a2cd20488015130938d83b0232a5069 Mon Sep 17 00:00:00 2001 From: lelo Date: Wed, 2 Apr 2025 09:54:35 +0000 Subject: [PATCH] hide first time bucket --- templates/dashboard.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/dashboard.html b/templates/dashboard.html index 05808dd..0475675 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -214,8 +214,12 @@ // shift the labels to local time zone const timeframe = "{{ timeframe }}"; // e.g., 'last24hours', '7days', '30days', or '365days' - const shiftedLabels = timeframeData.map(item => { + const shiftedLabels = timeframeData.map((item, index) => { if (timeframe === 'last24hours') { + + // Hide the first bucket + if (index === 0) return ''; + // item.bucket is now in the format "YYYY-MM-DDTHH:00:00Z" const bucketDate = new Date(item.bucket); const now = new Date();