import Stack from "@mui/material/Stack"; import Box from "@mui/material/Box"; import { BarChart3 } from "lucide-react"; import { BaseChart } from "@/Components/design-elements"; import Typography from "@mui/material/Typography"; import type { CheckSnapshot } from "@/Types/Check"; import { useTranslation } from "react-i18next"; import { getPageSpeedPalette } from "@/Utils/MonitorUtils"; import { useTheme } from "@mui/material/styles"; const MetricBox = ({ label, value, weight, }: { label: string; value: number; weight: number; }) => { const { t } = useTranslation(); const theme = useTheme(); const palette = getPageSpeedPalette(value); return ( {label} {`${value}%`} {`${t("pages.pageSpeed.charts.legend.weight")}: ${weight}%`} ); }; export const PiePageSpeedLegend = ({ latestCheck }: { latestCheck?: CheckSnapshot }) => { const theme = useTheme(); const { t } = useTranslation(); if (!latestCheck) { return null; } return ( } title={t("pages.pageSpeed.charts.legend.title")} > ); };