import { type ChartBand, type ChartGoalLine, type ChartReferenceLine, type ChartScale } from "./chartScale.js"; import { type ChartAnnotation } from "./chartAnnotations.js"; import { type DataLabelsProp } from "./chartDataLabels.js"; 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; }; export 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