"use client";
import { useQuery } from "@tanstack/react-query";
import {
BarChart,
Bar,
XAxis,
YAxis,
Tooltip,
ResponsiveContainer,
CartesianGrid,
ScatterChart,
Scatter,
Legend,
Cell,
PieChart,
Pie,
} from "recharts";
import { api } from "@/lib/api";
import { useT } from "@/i18n/context";
import { Card, CardContent } from "@/components/ui/card";
const TOOLTIP = {
contentStyle: {
background: "var(--popover)",
border: "1px solid var(--border)",
borderRadius: 8,
fontSize: 12,
color: "var(--popover-foreground)",
},
cursor: { fill: "var(--muted)", opacity: 0.3 },
};
export function EdaCharts() {
const { dict } = useT();
const { data, isLoading } = useQuery({ queryKey: ["eda"], queryFn: api.eda });
if (isLoading || !data) {
return (