hide first time bucket
This commit is contained in:
parent
dd4c417200
commit
0e3cfb280a
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user