Funnel Chart
How to create and configure the Funnel Chart
Introduction
The Funnel chart visualizes sequential stages in a process, showing decreasing quantities through segments. It’s key for tracking conversion rates, identifying potential bottlenecks, and optimizing process flows.
Preparation
The query .sql
file that the Funnel chart accepts must contain only 2 columns, one for the labels and another one for the values.
values | labels |
---|---|
245 | Pending |
120 | In Progress |
32 | Closed |
Syntax
You can use <FunnelChart ... />
to add it to your view. Within the tag you must add the properties to configure the chart.
Properties
To configure and customize the chart, you can add properties, some of which are required and some of which are optional.
The name of your .sql
file from which your chart will get the data. It’s not necessary to specify the full path, just the name, because we will search all folders until we find it
Specifies the height of the chart in px. You must enclose the number in brackets like height={720}
. The default value is 400px.
Specifies the width of the chart in px. You must enclose the number in brackets like width={480}
. By default it takes the 100% or the available width.
The order in which the data will be displayed. It can be ascending
or descending
. Default descending
.
The orientation of the chart. It can be vertical
or horizontal
. Default vertical
.
Whether the color of each layer is a gradient or whether each layer is a different color.
Specifies whether or not to show an animation when the page loads.
Display the category name directly on the chart.
Display the color legend for each series displayed.
Add a visual pattern to each series to help colorblind people distinguish them.
Reactive To Params
Within the opts
property we can include some options to modify the behavior of the chart. At the moment only the reactToParams
option is available.
If true, the chart will react to any change in the params to update the data displayed without the need to run the view manually.