import "./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"; export interface BarChartItem { label: string; value: number; /** Bar colour. Pass `var(--lotics--500)` and a theme repaints it. */ color?: string; /** * The entity's own mark, before its name — a `BrandMark`, an `Avatar`, a status * dot. The bar's COLOUR belongs to the measure, so it cannot carry identity as a * legend swatch does. Vertical: above the name, thinned out with the axis label * when the axis cannot fit them all. */ leading?: ReactNode; } export interface BarChartProps extends StyleProps { data: BarChartItem[]; orientation?: "vertical" | "horizontal"; formatNumber?: (n: number) => string; emptyLabel?: string; /** * The horizontal orientation's label column, in px (default 80). One width, * because every row's bar has to start on one left edge; a prop, because how * long an entity's name runs is the caller's fact. A REQUEST, never a * reservation: in a pane too narrow for both, the column gives way first. */ labelWidth?: number; /** * Plot height for `vertical`, in px (default 200) — the same knob `LineChart` * and `WaterfallChart` carry. The caller's, because height is what balances a * chart against the card BESIDE it. */ height?: number; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * The canonical SVG bar chart over `data: { label, value, color?, leading? }[]` — * `orientation` vertical|horizontal, nice auto axis ticks, `formatNumber` for * value labels. For one inline trend use `Sparkline`; for parts-of-a-whole, * `PieChart` / `Breakdown`. * * The vertical axis prints as many labels as it fits and thins the rest, so the * number of bars is never decided by how wide a label happens to be. */ export declare function BarChart(props: BarChartProps): React.ReactElement>;