"use client"; import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, ResponsiveContainer } from "recharts"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import type { RouterOutputs } from "@calcom/trpc/react"; import { useInsightsBookingParameters } from "@calcom/web/modules/insights/hooks/useInsightsBookingParameters"; import { valueFormatter } from "@calcom/features/insights/lib/valueFormatter"; import { ChartCard } from "../ChartCard"; const COLOR = { NO_SHOW_HOST: "#64748b", }; type NoShowHostsOverTimeData = RouterOutputs["viewer"]["insights"]["noShowHostsOverTime"][number]; // Custom Tooltip component const CustomTooltip = ({ active, payload, label: _label, }: { active?: boolean; payload?: Array<{ value: number; dataKey: string; name: string; color: string; payload: NoShowHostsOverTimeData; }>; label?: string; }) => { const { t } = useLocale(); if (!active || !payload?.length) { return null; } return (
{payload[0].payload.formattedDateFull}
{payload.map((entry, index: number) => ({t("no_show_hosts")}: {valueFormatter(entry.value)}
))}