diff --git a/packages/widgets/src/beszel-system-stats/component.tsx b/packages/widgets/src/beszel-system-stats/component.tsx index d5517e6ef..96fbc9945 100644 --- a/packages/widgets/src/beszel-system-stats/component.tsx +++ b/packages/widgets/src/beszel-system-stats/component.tsx @@ -232,7 +232,14 @@ export default function BeszelSystemStatsWidget({ )} @@ -240,7 +247,14 @@ export default function BeszelSystemStatsWidget({ )} @@ -248,7 +262,13 @@ export default function BeszelSystemStatsWidget({ )} @@ -256,7 +276,13 @@ export default function BeszelSystemStatsWidget({ )} @@ -264,7 +290,13 @@ export default function BeszelSystemStatsWidget({ )} @@ -274,7 +306,14 @@ export default function BeszelSystemStatsWidget({ )} @@ -282,7 +321,14 @@ export default function BeszelSystemStatsWidget({ )} @@ -290,7 +336,13 @@ export default function BeszelSystemStatsWidget({ )} diff --git a/packages/widgets/src/beszel/_shared/chart.tsx b/packages/widgets/src/beszel/_shared/chart.tsx index 83434459e..6af0ce567 100644 --- a/packages/widgets/src/beszel/_shared/chart.tsx +++ b/packages/widgets/src/beszel/_shared/chart.tsx @@ -51,45 +51,47 @@ type BeszelAreaChartProps = Omit { - const mergedYAxis = useMemo( - () => ({ - ...yAxisBase, - width: 32, - tickMargin: 2, - ...(yAxisDomain ? { domain: yAxisDomain } : {}), - tickFormatter: yAxisFormatter, - ...yAxisPropsOverride, - }), - [yAxisFormatter, yAxisDomain, yAxisPropsOverride], - ); +const BeszelAreaChart = memo( + ({ + yAxisFormatter, + yAxisDomain, + yAxisProps: yAxisPropsOverride, + type = "default", + ...props + }: BeszelAreaChartProps) => { + const mergedYAxis = useMemo( + () => ({ + ...yAxisBase, + width: 32, + tickMargin: 2, + ...(yAxisDomain ? { domain: yAxisDomain } : {}), + tickFormatter: yAxisFormatter, + ...yAxisPropsOverride, + }), + [yAxisFormatter, yAxisDomain, yAxisPropsOverride], + ); - return ( - - ); -}); + return ( + + ); + }, +); export const useSystemChartData = ( systemStats: BeszelSystemStatsRecord[] | undefined,