update cpu / container axis datamax calculations

This commit is contained in:
henrygd
2025-11-14 15:43:50 -05:00
parent 3650482b09
commit 32c8e047e3
4 changed files with 19 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ import {
import { chartMargin, cn, formatShortDate } from "@/lib/utils"
import type { ChartData, SystemStatsRecord } from "@/types"
import { useYAxisWidth } from "./hooks"
import { AxisDomain } from "recharts/types/util/types"
export type DataPoint = {
label: string
@@ -41,7 +42,7 @@ export default function AreaChartDefault({
tickFormatter: (value: number, index: number) => string
contentFormatter: ({ value, payload }: { value: number; payload: SystemStatsRecord }) => string
dataPoints?: DataPoint[]
domain?: [number, number]
domain?: AxisDomain
legend?: boolean
showTotal?: boolean
itemSorter?: (a: any, b: any) => number