Sequential conversion stages with AG and Toast styles, editable geometry and interactive tooltips.
Data Format
Stages remain in input order. Values are non-negative volumes; invalid or negative values become zero. Width is proportional to the largest input value. Empty and all-zero data render without marks. Percentages use the original data even when a stage is hidden.
type FunnelChartData = {
stages: { label: string; value: number }[];
};
AG Style Config
Funnel
Property
Type
Default
Description
funnel.gap
number
3
Vertical gap between stages in pixels.
funnel.widthRatio
number
0.64
Fraction of plot width reserved for the funnel; the remaining width holds labels.
legend.visible
boolean
false
Show interactive stage keys. Hiding a stage preserves the original conversion denominators and color indices.
dataLabel.visible
boolean
true
Show labels beside each stage.
dataLabel.color
string
Style legend color
Label text color. Set this for a custom background.
dataLabel.formatter
(stage: FunnelStage) => string
Label, value and percentage
Formats stage labels. percentage is relative to the original first stage; conversion is relative to the original previous stage.
AG Hover
Property
Type
Default
Description
funnel.dimOpacity
number
0.35
Opacity of other stages while one is hovered. The tooltip follows the pointer.
Toast Style Config
Funnel
Property
Type
Default
Description
funnel.gap
number
3
Vertical gap between stages in pixels.
funnel.widthRatio
number
0.64
Fraction of plot width reserved for the funnel; the remaining width holds labels.
legend.visible
boolean
false
Show interactive stage keys. Hiding a stage preserves the original conversion denominators and color indices.
dataLabel.visible
boolean
true
Show labels beside each stage.
dataLabel.color
string
Style legend color
Label text color. Set this for a custom background.
dataLabel.formatter
(stage: FunnelStage) => string
Label, value and percentage
Formats stage labels. percentage is relative to the original first stage; conversion is relative to the original previous stage.
Toast Hover
Property
Type
Default
Description
funnel.hoverBorderColor
string
"white"
Outline color of the hovered stage.
funnel.hoverBorderWidth
number
4
Outline thickness in pixels. The tooltip is anchored to the hovered stage.
animation.enabled
boolean
true
Enable the entrance reveal. Disable for static exports.
Custom Parts
Override any visual element by providing a custom builder function: (args, context) => Widget
Part
Args
Description
layout
{ title, legends, plot }
Title, stage keys and plot layout.
plot
{ stages: { stage, widget }[], tooltipArea }
Position stage widgets using normalized geometry.
stage
FunnelStage & { isHovered, dataLabel }
Stage shape. Headless owns hover handling.
dataLabel
FunnelStage
Content beside each stage.
tooltip
FunnelStage
Hovered stage details, value and conversion rates.
tooltipArea
{ stage, tooltip }
Style-specific tooltip placement.
legend
{ name, index, isVisible }
Stage key. Headless owns the visibility toggle.
title
undefined
Chart heading.
Context: FunnelChartContext
Available in every custom builder via the second argument.
Name
Type
Kind
Description
stages
FunnelStage[]
property
Visible stages with original indices, value, percentage, conversion and normalized top/height/topWidth/bottomWidth.