Funnel
Examples
API Reference
Types come from the public API. A dash indicates no default is documented here.
FunnelChart props
Public source| Prop | Type | Default | Description |
|---|---|---|---|
key | KeepAliveKey<K, Ends> | undefined | '' | The child's identity among its parent's children of one component, or a kept child's among its author's. The empty string by default. |
onEmit | Show type((events: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined) | { readonly HoverChanged: (event: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.data | Show typereadonly { readonly label: string; readonly value: number; readonly color?: string; readonly gradient?: readonly { readonly offset: string | number; readonly color: string; }[]; readonly displayValue?: string; }[] | Required | |
props.id | string | Required | |
props.style | { readonly [x: string]: string | number; } | — | |
props.gap | number | 4 | |
props.color | string | "var(--chart-1)" | |
props.grid | Show typeboolean | { readonly lines?: boolean; readonly bands?: boolean; readonly bandColor?: string; readonly lineColor?: string; readonly lineOpacity?: number; readonly lineWidth?: number; } | false | |
props.className | string | '' | |
props.ariaLabel | string | "Funnel chart" | |
props.orientation | "horizontal" | "vertical" | "horizontal" | |
props.locale | string | 'en-US' | |
props.ariaDescription | string | — | |
props.layers | number | 3 | |
props.staggerDelay | number | 0.12 | |
props.enterTransition | Show type{ readonly delay?: number; readonly duration?: number; readonly ease?: string | readonly number[]; readonly type?: "spring" | "tween"; readonly stiffness?: number; readonly damping?: number; readonly mass?: number; readonly bounce?: number; } | — | |
props.hoveredIndex | number | null | null | |
props.showLabels | boolean | true | |
props.labelOrientation | "horizontal" | "vertical" | — | |
props.showPercentage | boolean | true | |
props.showValues | boolean | true | |
props.valueFormat | Show type{ readonly style?: "decimal" | "percent" | "currency"; readonly currency?: string; readonly unit?: string; readonly maximumFractionDigits?: number; readonly notation?: "compact" | "standard"; readonly compactDisplay?: "long" | "short"; readonly minimumFractionDigits?: number; readonly minimumIntegerDigits?: number; readonly minimumSignificantDigits?: number; readonly maximumSignificantDigits?: number; readonly currencyDisplay?: "symbol" | "code" | "name" | "narrowSymbol"; readonly unitDisplay?: "long" | "short" | "narrow"; } | — | |
props.percentageFormat | Show type{ readonly style?: "decimal" | "percent" | "currency"; readonly currency?: string; readonly unit?: string; readonly maximumFractionDigits?: number; readonly notation?: "compact" | "standard"; readonly compactDisplay?: "long" | "short"; readonly minimumFractionDigits?: number; readonly minimumIntegerDigits?: number; readonly minimumSignificantDigits?: number; readonly maximumSignificantDigits?: number; readonly currencyDisplay?: "symbol" | "code" | "name" | "narrowSymbol"; readonly unitDisplay?: "long" | "short" | "narrow"; } | — | |
props.edges | "curved" | "straight" | "curved" | |
props.labelLayout | "grouped" | "spread" | "spread" | |
props.labelAlign | "end" | "start" | "center" | "center" |