When to Use Funnel Charts
Funnel charts are ideal for visualizing data that represents stages in a process, particularly when values progressively decrease at each stage. Common use cases include:- Sales funnels: Tracking prospects through the sales pipeline from leads to closed deals
- Conversion funnels: Monitoring user progression through website flows or checkout processes
- Filtering processes: Showing how data is refined through multiple filtering stages
- Hierarchical data: Displaying proportional relationships in ranked or ordered data
Basic Configuration
A funnel chart uses thetype: 'funnel' series option. Here’s the basic structure:
Complete Working Example
Key Options and Properties
Series Options
sort
Type: 'ascending' | 'descending' | 'none'Default:
'descending'
Controls how data items are ordered in the funnel. Use 'ascending' for pyramid charts.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:93
orient
Type: 'vertical' | 'horizontal'Default:
'vertical'
Orientation of the funnel chart.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:95
gap
Type: numberDefault:
0
Gap between each trapezoid in pixels.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:97
funnelAlign
Type: 'left' | 'center' | 'right' (vertical) or 'top' | 'center' | 'bottom' (horizontal)Default:
'center'
Horizontal alignment of the funnel when oriented vertically, or vertical alignment when oriented horizontally.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:99
minSize / maxSize
Type: number | stringDefault:
'0%' / '100%'
Minimum and maximum width (for vertical) or height (for horizontal) of the funnel, as a percentage or absolute value.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:90-91
Label Options
label.position
Type: 'inner' | 'inside' | 'center' | 'outer' | 'left' | 'right' | 'top' | 'bottom' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom'Default:
'outer'
Position of the label. The funnel chart extends the standard label positions with special corner positions.
Source: ~/workspace/source/src/chart/funnel/FunnelSeries.ts:49-52
Data Item Options
Each data item can be a number or an object with detailed configuration:Callback Data Parameters
In formatters and event handlers, funnel charts provide a specialpercent parameter:
Layout Algorithm
The funnel chart uses a specialized layout algorithm that:- Sorts data according to the
sortoption - Maps values to sizes using linear interpolation between
min/maxandminSize/maxSize - Calculates trapezoid points based on
funnelAlign - Positions labels and label lines according to
label.position