"use client"; import React from "react"; import { BarChart } from "./BarChart"; import { HorizontalBarChart } from "./HorizontalBarChart"; import { LineChart } from "./LineChart"; import { AreaChart } from "./AreaChart"; import { PieChart } from "./PieChart"; import { StackedBarChart } from "./StackedBarChart"; import { ComboChart } from "./ComboChart"; import { ChartConfig, ChartData, ElementSubtype } from "../types"; interface ChartProps { chartType: ElementSubtype; data: ChartData; config: ChartConfig; width?: number; height?: number; } /** * 통합 차트 컴포넌트 * - 차트 타입에 따라 적절한 D3 차트 컴포넌트를 렌더링 */ export function Chart({ chartType, data, config, width, height }: ChartProps) { // 데이터가 없으면 placeholder 표시 if (!data || !data.labels.length || !data.datasets.length) { return (