style: auto-fix lint and format
This commit is contained in:
1 parent
6189daf6a4
commit
583b1d2935
1 file changed
+29
-34
@@ -49,40 +49,35 @@ type BeszelAreaChartProps = Omit<AreaChartProps, "dataKey" | "curveType" | "with
|
|||||||
yAxisDomain?: [number, string];
|
yAxisDomain?: [number, string];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const BeszelAreaChart = memo(({
|
export const BeszelAreaChart = memo(
|
||||||
yAxisFormatter,
|
({ yAxisFormatter, yAxisDomain, yAxisProps, style, type = "default", ...props }: BeszelAreaChartProps) => (
|
||||||
yAxisDomain,
|
<AreaChart
|
||||||
yAxisProps,
|
dataKey="time"
|
||||||
style,
|
curveType="monotone"
|
||||||
type = "default",
|
withGradient={false}
|
||||||
...props
|
connectNulls
|
||||||
}: BeszelAreaChartProps) => (
|
withDots={true}
|
||||||
<AreaChart
|
type={type}
|
||||||
dataKey="time"
|
strokeWidth={1}
|
||||||
curveType="monotone"
|
fillOpacity={0.2}
|
||||||
withGradient={false}
|
activeDotProps={activeDot}
|
||||||
connectNulls
|
dotProps={hiddenDot}
|
||||||
withDots={true}
|
withXAxis
|
||||||
type={type}
|
withYAxis
|
||||||
strokeWidth={1}
|
w="100%"
|
||||||
fillOpacity={0.2}
|
style={{ minWidth: 0, minHeight: 0, ...style }}
|
||||||
activeDotProps={activeDot}
|
yAxisProps={{
|
||||||
dotProps={hiddenDot}
|
...yAxisBase,
|
||||||
withXAxis
|
width: 32,
|
||||||
withYAxis
|
tickMargin: 2,
|
||||||
w="100%"
|
...(yAxisDomain ? { domain: yAxisDomain } : {}),
|
||||||
style={{ minWidth: 0, minHeight: 0, ...style }}
|
tickFormatter: yAxisFormatter,
|
||||||
yAxisProps={{
|
...yAxisProps,
|
||||||
...yAxisBase,
|
}}
|
||||||
width: 32,
|
{...props}
|
||||||
tickMargin: 2,
|
/>
|
||||||
...(yAxisDomain ? { domain: yAxisDomain } : {}),
|
),
|
||||||
tickFormatter: yAxisFormatter,
|
);
|
||||||
...yAxisProps,
|
|
||||||
}}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
));
|
|
||||||
|
|
||||||
export const useSystemChartData = (
|
export const useSystemChartData = (
|
||||||
systemStats: BeszelSystemStatsRecord[] | undefined,
|
systemStats: BeszelSystemStatsRecord[] | undefined,
|
||||||
|
|||||||
Reference in new issue
Block a user