mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
change x axis time format for 1 week chart and add key
This commit is contained in:
@@ -84,6 +84,7 @@ export default function DiskIoChart({
|
|||||||
const color = i ? 'hsl(var(--chart-1))' : 'hsl(var(--chart-3))'
|
const color = i ? 'hsl(var(--chart-1))' : 'hsl(var(--chart-3))'
|
||||||
return (
|
return (
|
||||||
<Area
|
<Area
|
||||||
|
key={i}
|
||||||
dataKey={dataKey}
|
dataKey={dataKey}
|
||||||
name={action}
|
name={action}
|
||||||
type="monotoneX"
|
type="monotoneX"
|
||||||
|
@@ -178,7 +178,7 @@ export const chartTimeData: ChartTimeData = {
|
|||||||
expectedInterval: 60_000 * 120,
|
expectedInterval: 60_000 * 120,
|
||||||
label: '1 week',
|
label: '1 week',
|
||||||
ticks: 7,
|
ticks: 7,
|
||||||
format: (timestamp: string) => formatShortDate(timestamp),
|
format: (timestamp: string) => formatDay(timestamp),
|
||||||
getOffset: (endTime: Date) => timeDay.offset(endTime, -7),
|
getOffset: (endTime: Date) => timeDay.offset(endTime, -7),
|
||||||
},
|
},
|
||||||
'30d': {
|
'30d': {
|
||||||
|
Reference in New Issue
Block a user