"use client"; import { Bar, BarChart, XAxis, YAxis } from "recharts"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { type ChartConfig, ChartContainer, ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; import { cn } from "@/lib/utils"; interface ChartCard4Props { title?: string; description?: string; className?: string; } const numberFormatter = new Intl.NumberFormat("fa-IR", { maximumFractionDigits: 0, }); const compactNumberFormatter = new Intl.NumberFormat("fa-IR", { notation: "compact", maximumFractionDigits: 1, }); const chartData = [ { name: "Chrome", value: 4520 }, { name: "Safari", value: 3210 }, { name: "Firefox", value: 1890 }, { name: "Edge", value: 1240 }, { name: "سایر", value: 680 }, ]; const chartConfig = { value: { label: "کاربران", color: "var(--chart-1)", }, } satisfies ChartConfig; const ChartCard4 = ({ title = "استفاده از مرورگر", description = "کاربران به تفکیک نوع مرورگر", className, }: ChartCard4Props) => { return ( {title} {description} compactNumberFormatter.format(Number(value)) } /> numberFormatter.format(Number(value)) } /> } cursor={{ fillOpacity: 0.05 }} /> ); }; export { ChartCard4 };