import { Area, AreaChart, CartesianGrid, Legend, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts"; import type { AnalyticsOverviewDto } from "~/utils/helpers/.server/AnalyticsService"; import { useLocaleFormatters } from "~/locale/format"; import { Card } from "../ui/card"; type AnalyticsOverviewChartProps = { chartData: NonNullable["pageViewsAndUniqueVisitors"]; pageViewsLabel: string; uniqueVisitorsLabel: string; }; export default function AnalyticsOverviewChart({ chartData, pageViewsLabel, uniqueVisitorsLabel }: AnalyticsOverviewChartProps) { const formatters = useLocaleFormatters(); const valueFormatter = (value: number) => formatters.number(value, { maximumFractionDigits: 0 }); return ( valueFormatter(Number(value))} /> ); }