"use client"; import { Bar, BarChart, XAxis } from "recharts"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from "@/components/ui/chart"; import { cn } from "@/lib/utils"; interface ChartCard12Props { title?: string; description?: string; className?: string; } const currencyFormatter = new Intl.NumberFormat("fa-IR", { style: "currency", currency: "IRR", minimumFractionDigits: 0, maximumFractionDigits: 0, }); const chartData = [ { quarter: "سه‌ماهه ۱", revenue: 4200, costs: 2800, profit: 1400 }, { quarter: "سه‌ماهه ۲", revenue: 5100, costs: 3200, profit: 1900 }, { quarter: "سه‌ماهه ۳", revenue: 4800, costs: 3000, profit: 1800 }, { quarter: "سه‌ماهه ۴", revenue: 6200, costs: 3800, profit: 2400 }, ]; const chartConfig = { revenue: { label: "درآمد", color: "var(--chart-1)", }, costs: { label: "هزینه", color: "var(--chart-2)", }, profit: { label: "سود", color: "var(--chart-3)", }, } satisfies ChartConfig; const ChartCard12 = ({ title = "تفکیک سه‌ماهه", description = "درآمد، هزینه و سود به تفکیک فصل", className, }: ChartCard12Props) => { return ( {title} {description} currencyFormatter.format(Number(value)) } /> } cursor={{ fillOpacity: 0.05 }} /> } /> ); }; export { ChartCard12 };