import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@godxjp/ui/data-display"; import { Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout"; import { AreaChart, BarChart, LineChart, PieChart } from "@godxjp/ui/charts"; /** * Charts — tree-shaken `@godxjp/ui/charts` entry (needs the `recharts` optional * peer). Every chart owns the `--chart-1..6` palette, locale-aware Intl number * formatting on its ticks/tooltips, a visible caption + a screen-reader text * alternative, and a built-in empty state. Composed only from real primitives. */ const revenue = [ { month: "1月", plan: 1200000, actual: 980000 }, { month: "2月", plan: 1500000, actual: 1610000 }, { month: "3月", plan: 1800000, actual: 1750000 }, { month: "4月", plan: 1600000, actual: 1720000 }, { month: "5月", plan: 2000000, actual: 1980000 }, { month: "6月", plan: 2200000, actual: 2410000 }, ]; const traffic = [ { day: "月", organic: 320, paid: 140, referral: 80 }, { day: "火", organic: 410, paid: 180, referral: 90 }, { day: "水", organic: 380, paid: 160, referral: 110 }, { day: "木", organic: 520, paid: 220, referral: 130 }, { day: "金", organic: 610, paid: 260, referral: 150 }, ]; const expenses = [ { category: "給与", amount: 4200000 }, { category: "家賃", amount: 1800000 }, { category: "光熱費", amount: 600000 }, { category: "システム", amount: 950000 }, { category: "その他", amount: 430000 }, ]; const sparseRevenue = [ { month: "1月", actual: 980000 }, { month: "2月", actual: null }, { month: "非常に長いカテゴリ名", actual: -120000 }, ]; const jpy = { style: "currency", currency: "JPY" } as const; export default function Demo() { return ( LineChart · 月次トレンド 複数系列の推移。numberFormat で通貨をロケールに合わせて表示します。 BarChart · 地域/期間比較 compact 表記。stacked で構成比に切替可能。 AreaChart · 累積構成 stacked で合計の積み上がりを表現。 PieChart · 構成比 少数スライス向け。donut にも切替可能。 空状態 data が空のとき EmptyState を表示します。 BarChart · 横方向・非積み上げ 長いカテゴリと負数を含む edge-data frame。 PieChart · full pie・custom colours donut=false と colors の明示指定。 ); }