"use client"; import { Label, PolarRadiusAxis, RadialBar, RadialBarChart } from "recharts"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/components/ui/card"; import { type ChartConfig, ChartContainer } from "@/components/ui/chart"; import { cn } from "@/lib/utils"; interface ChartCard17Props { title?: string; description?: string; value?: number; max?: number; unit?: string; className?: string; } const numberFormatter = new Intl.NumberFormat("fa-IR", { maximumFractionDigits: 0, }); const chartConfig = { value: { label: "امتیاز", color: "var(--chart-1)", }, } satisfies ChartConfig; const ChartCard17 = ({ title = "امتیاز عملکرد", description = "عملکرد فعلی سامانه", value = 73, max = 100, unit = "", className, }: ChartCard17Props) => { const percentage = Math.round((value / max) * 100); const chartData = [{ value: percentage, fill: "var(--chart-1)" }]; const startAngle = 180; const endAngle = 180 - (180 * percentage) / 100; return ( {title} {description}
{numberFormatter.format(0)} {numberFormatter.format(max)}
); }; export { ChartCard17 };