import Stack from "@mui/material/Stack"; import Box from "@mui/material/Box"; import { useTheme } from "@mui/material/styles"; import type { Check } from "@/Types/Check"; import { HistogramResponseTimeTooltip } from "@/Components/v2/Monitors/HistogramResponseTimeTooltip"; import { normalizeResponseTimes } from "@/Utils/DataUtils"; export const HistogramResponseTime = ({ checks }: { checks: Check[] }) => { const normalChecks = normalizeResponseTimes(checks, "responseTime"); let data = Array(); if (!normalChecks || normalChecks.length === 0) { return null; } if (normalChecks.length !== 25) { const placeholders = Array(25 - normalChecks.length).fill("placeholder"); data = [...normalChecks, ...placeholders]; } else { data = normalChecks; } const theme = useTheme(); return ( event.stopPropagation()} sx={{ cursor: "default", }} > {data.map((check, index) => { if (check === "placeholder") { return ( ); } else { return ( ); } })} ); };