import "./stacked_bar_chart.css"; import type * as React from "react"; import { type ReactNode } from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; import type { TextColor } from "./text_ink"; export interface StackedBarSeries { key: string; label: string; /** Pass `var(--lotics--500)` so a theme repaints it. */ color: string; /** The mark its legend row's name leads with, after its swatch, where the series is someone or something with a * face (a person's `Avatar`, a linked row's picture); unsized, a line's rung. */ leading?: ReactNode; } export interface StackedBarRow { key: string; label: string; /** The entity's own mark (a `BrandMark`, `Avatar`, status dot), so a chart and table over the same * entities draw them alike; unsized, a line's rung, and every row holds the slot where one has a mark. A * slot, as on `Table`/`FileRow`, since `label` is also the accessible name and the clamp target. */ leading?: ReactNode; /** A neutral qualifier ("Đang chạy", "12 đơn"). */ meta?: string; /** Keyed by `StackedBarSeries.key`; negatives are dropped. */ values: Record; /** Preformatted by the caller. */ value?: string; valueTone?: TextColor; /** One sentence saying what the segments amount to. */ caption?: string; } export interface StackedBarChartProps extends StyleProps { series: StackedBarSeries[]; rows: StackedBarRow[]; /** Defaults to the largest row total; override only to share a ruler with a neighbouring chart. */ max?: number; /** Default 12. */ height?: number; /** Default true. */ legend?: boolean; emptyLabel?: string; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** Rows of stacked bars on one shared scale (spend against return per campaign, cost make-up per line): * length answers how big, segments what it is made of. A split `Progress` fills its track whatever the * total, so ten rows would read equal; `Breakdown` ranks one whole. Colour carries the segments, so the * legend is on and colours are the caller's (one `ColorName` family per dimension); `caption` is the * second channel. */ export declare function StackedBarChart(props: StackedBarChartProps): React.ReactElement>;