mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 10:46:16 +01:00
add max 1m values for cpu, bandwidth, disk io
* removes unused things from chart.tsx * updates y axis width only if it grows * add generic area chart component and remove individual cpu, bandwidth, disk io charts
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
toFixedFloat,
|
||||
getSizeVal,
|
||||
getSizeUnit,
|
||||
chartMargin,
|
||||
} from '@/lib/utils'
|
||||
// import { useMemo } from 'react'
|
||||
// import Spinner from '../spinner'
|
||||
@@ -35,21 +36,11 @@ export default function DiskChart({
|
||||
<div>
|
||||
{/* {!yAxisSet && <Spinner />} */}
|
||||
<ChartContainer
|
||||
config={{}}
|
||||
className={cn('h-full w-full absolute aspect-auto bg-card opacity-0 transition-opacity', {
|
||||
'opacity-100': yAxisWidth,
|
||||
})}
|
||||
>
|
||||
<AreaChart
|
||||
accessibilityLayer
|
||||
data={systemData}
|
||||
margin={{
|
||||
left: 0,
|
||||
right: 0,
|
||||
top: 10,
|
||||
bottom: 0,
|
||||
}}
|
||||
>
|
||||
<AreaChart accessibilityLayer data={systemData} margin={chartMargin}>
|
||||
<CartesianGrid vertical={false} />
|
||||
<YAxis
|
||||
className="tracking-tighter"
|
||||
|
||||
Reference in New Issue
Block a user