export type BarChartTone = "category1" | "category2" | "category3" | "category4" | "category5" | "category6" | "category7" | "category8"; export type BarChartDatum = { label: string; value: number; tone?: BarChartTone; /** Lower error-bar extent (value-axis units). Drawn only when finite. */ errorLow?: number; /** Upper error-bar extent (value-axis units). Drawn only when finite. */ errorHigh?: number; }; /** * Semantic tone for an analytical overlay (reference line / band / goal). * Maps to the feedback token family — markers, not categorical series. */ export type ChartOverlayTone = "neutral" | "success" | "warning" | "error" | "info"; export type ChartReferenceLine = { value: number; label?: string; tone?: ChartOverlayTone; axis?: "x" | "y"; }; export type ChartBand = { from: number; to: number; label?: string; tone?: ChartOverlayTone; }; export type ChartGoalLine = { value: number; label?: string; }; /** Value-axis scale type. `log` requires strictly positive values. */ export type ChartScale = "linear" | "log"; import { type ChartAnnotation } from "./chartAnnotations.js"; import { type DataLabelsProp } from "./chartDataLabels.js"; type BarChartProps = { data: BarChartDatum[]; width?: number; height?: number; orientation?: "vertical" | "horizontal"; label: string; /** * Fixed value-axis domain `[min, max]`. When provided (and finite), the * value scale uses it instead of the data-derived min/max — letting several * BarCharts in a grid share one scale (small multiples). When absent or * invalid, the scale falls back to the auto data range (unchanged). */ domain?: [number, number]; /** * Keys of the currently selected bars (a bar's key is its `label`). * CONTROLLED — the parent owns the toggle; the component never stores * selection. When non-empty the selected bars stay full opacity (+ accent) * and the rest dim; when empty every bar is normal. Defaults to []. */ selectedKeys?: string[]; /** * Called with the bar's key (its `label`) when the user selects it. When * provided, an ACCESSIBLE row of filter chips (real