Reflex Cloud - Fast, secure & scalable hosting. One command to deploy.

Funnel Chart

A funnel chart is a graphical representation used to visualize how data moves through a process. In a funnel chart, the dependent variable’s value diminishes in the subsequent stages of the process. It can be used to demonstrate the flow of users through a business or sales process.

Simple Example

Event Triggers

Funnel chart supports on_click, on_mouse_enter, on_mouse_leave and on_mouse_move event triggers, allows you to interact with the funnel chart and perform specific actions based on user interactions.

Dynamic Data

Here is an example of a funnel chart with a State. Here we have defined a function randomize_data, which randomly changes the data when the graph is clicked on using on_click=FunnelState.randomize_data.

Changing the Chart Animation

The is_animation_active prop can be used to turn off the animation, but defaults to True. animation_begin sets the delay before animation starts, animation_duration determines how long the animation lasts, and animation_easing defines the speed curve of the animation for smooth transitions.

API Reference

rx.recharts.FunnelChart

A Funnel chart component in Recharts.

PropType | ValuesDefault
layout
str
"centric"
margin
Dict[str, Any]
{"top": 5, "right": 5, "bottom": 5, "left": 5}
stroke
Union[str, Color]
width
Union[str, int]
"100%"
height
Union[str, int]
"100%"

Valid Children

LegendGraphingTooltipFunnel

rx.recharts.Funnel

A Funnel component in Recharts.

PropType | ValuesDefault
data
List
data_key
Union[str, int]
name_key
str
"name"
legend_type
"line" | "plainline" | ...
"line"
is_animation_active
bool
True
animation_begin
int
0
animation_duration
int
1500
animation_easing
"ease" | "ease-in" | ...
stroke
Union[str, Color]
rx.color("gray", 3)
trapezoids
List

Valid Children

LabelListCell

Event Triggers

See the full list of default event triggers
TriggerDescription
on_animation_start Valid children components The customized event handler of animation start
on_animation_end The customized event handler of animation end