/** "sparkline" strips axes, legend and title for a compact inline trend; the others only change fill/stacking. */ export type AreaChartVariant = "basic" | "stacked" | "gradient" | "sparkline"; /** One named line in a multi-series area chart; `name` becomes its legend label. */ export type ApexAreaSeries = { name: string; data: number[]; }; /** Props for the area chart; unlike ApexLineChart, `data`/`series` are re-read every render, not frozen at mount. */ export type ApexAreaChartProps = { /** Defaults to "basic"; "sparkline" also hides the title, axes and legend. */ variant?: AreaChartVariant; /** Ignored entirely once `series` is also passed — `series` always wins, no merge. */ data?: number[]; /** Multiple named lines; wins over `data`. The legend appears only when there is more than one series. */ series?: ApexAreaSeries[]; /** X-axis category labels, one per data point; hidden in the "sparkline" variant. */ labels?: string[]; /** Heading above the chart and the name of the series built from `data` (default "Series 1"); not drawn in "sparkline". */ title?: string; /** Horizontal alignment of the title. Defaults to "left". */ titlePosition?: "left" | "center" | "right"; /** Chart height as a px number or CSS string. Defaults to 320; also sizes the loading skeleton. */ height?: number | string; /** Chart width as a px number or CSS string. Defaults to "100%"; also sizes the loading skeleton. */ width?: number | string; /** Series colours in order. Defaults to the theme's categorical series palette. */ colors?: string[]; /** Defaults to true, but the legend only shows with more than one series and never in "sparkline". */ showLegend?: boolean; /** Legend placement. Defaults to "bottom". */ legendPosition?: "top" | "right" | "bottom" | "left"; /** Formats y-axis tick labels from the numeric value; no effect in "sparkline", where the axis is hidden. */ yAxisFormatter?: (value: number) => string; };