import { Bar, BarChart, CartesianGrid, XAxis, YAxis } from 'recharts';
import { ChartContainer, ChartTooltip, type ChartConfig } from '@/components/ui/chart';
import { Typography } from '@/components/ui/typography';
import { themeOf } from '../palette';
import { won, wonCompact, pct, monthLabel } from '../fmt';
import type { MonthPoint } from '../types';
// 월별 목표가 대비 절감액(단일 시리즈=크기). 한 축 원칙 — 절감률은 이중축 대신 툴팁에 얹는다.
const config = {
savings: { label: '절감액', theme: themeOf('emerald') },
} satisfies ChartConfig;
export function SavingsTrendChart({ data }: { data: MonthPoint[] }) {
return (