update types, add skeleton for stacked timing phase chart
This commit is contained in:
1 parent
0cf8cfa5dc
commit
13c921531c
4 files changed
+65
-3
No files matched your search
@@ -0,0 +1,39 @@
|
||||
import type { GroupedUptimeCheck } from "@/Types/Check";
|
||||
import { Area, AreaChart, CartesianGrid, ResponsiveContainer } from "recharts";
|
||||
|
||||
import { useTheme } from "@mui/material";
|
||||
|
||||
export const HistogramDetailsStacked = ({
|
||||
checks = [],
|
||||
range,
|
||||
}: {
|
||||
checks: GroupedUptimeCheck[];
|
||||
range: string;
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
|
||||
console.log(JSON.stringify(checks, null, 2));
|
||||
|
||||
return (
|
||||
<ResponsiveContainer
|
||||
width="100%"
|
||||
height={300}
|
||||
>
|
||||
<AreaChart data={checks.slice()}>
|
||||
<CartesianGrid
|
||||
stroke={theme.palette.divider}
|
||||
strokeWidth={1}
|
||||
strokeOpacity={1}
|
||||
fill="transparent"
|
||||
vertical={false}
|
||||
/>
|
||||
<Area
|
||||
type="monotone"
|
||||
dataKey="avgResponseTime"
|
||||
stroke={theme.palette.primary.main}
|
||||
fill="url(#colorUv)"
|
||||
/>
|
||||
</AreaChart>
|
||||
</ResponsiveContainer>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user