Skip to content

Distribution Chart

Shared, presentation-only distribution chart. Domain filters own their data and labels; this control owns chart geometry, tooltips, focus, and visual state.

export function DistributionChart({
data,
ariaLabel,
type = 'bar',
height = 72,
showPoints = type !== 'bar',
className = '',
renderTooltip,
}: DistributionChartProps): any;

export type DistributionChartType = 'bar' | 'line' | 'area';

interface DistributionChartTooltip {
readonly title: string;
readonly details?: readonly string[]
}

interface DistributionChartDatum {
readonly key: string;
readonly value: number;
readonly selected?: boolean;
readonly tooltip: DistributionChartTooltip
}

interface DistributionChartProps {
readonly data: readonly DistributionChartDatum[];
readonly ariaLabel: string;
readonly type?: DistributionChartType;
readonly height?: number;
readonly showPoints?: boolean;
readonly className?: string;
readonly renderTooltip?: (datum: DistributionChartDatum, index: number) => ComponentChildren
}