Skip to main content

The Funnel Chart component for classic apps

Classic apps

You're viewing documentation for classic apps, which use Retool's original app editor. The new app builder is the recommended way to build apps and where Retool focuses new development.

The Funnel Chart component renders data in a funnel shape, with sections of decreasing size. Funnel Chart is useful for visualizing data in different stages of a process.

Best practice

For more information about using the Funnel Chart component, refer to the charts guide.

Properties​

All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.

chartType​

The type of chart to display.

Type string
Format Plain Text
Configurability Inspector > Content > Series > Chart type
Allowed Values
ValueUI OptionDescription
barBar

Bar Chart or Stacked Bar Chart.

bubbleBubble

Bubble Chart.

funnelFunnel

Funnel Chart.

heatmapHeatmap

Heat Map.

lineLine

Line Chart or Sparkline.

mixedMixed

Mixed Chart.

piePie

Pie Chart.

plotlyJsonPlotly JSON

Plotly JSON Chart.

sankeySankey

Sankey Chart.

scatterScatter

Scatter Chart.

sunburstSunburst

Sunburst Chart.

treemapTreemap

Treemap.

waterfallWaterfall

Waterfall Chart.

Defaultfunnel
Examples
false"bar"

clearOnEmptyData​

Whether to clear the chart when the data is empty.

Type boolean
Format True/False
Configurability Inspector > Content > Clear when data is empty
Defaultfalse
Examples
falsetrue

colorArray​

A list of colors to use when colorInputMode is colorArray.

Type array
Format Color
Array values string
Configurability Inspector
Defaultnull
Examples
false["#ff0000", "#00ff00", "#0000ff"]

colorArrayDropDown​

A list of colors to use when colorInputMode is colorArrayDropDown.

Type array
Format Color
Array values string
Configurability Inspector > Appearance > Color selection
Defaultnull
Examples
false["#ff0000", "#00ff00", "#0000ff"]

colorInputMode​

The mode for the color input.

Type string
Format Plain Text
Configurability Inspector > Appearance > Color selection
Allowed Values
ValueUI OptionDescription
colorArrayArray

Color array.

gradientColorArrayPalette

Gradient color array.

colorArrayDropDownManual

Color array dropdown.

DefaultcolorArray
Examples
false"colorArray"

events​

A list of configured event handlers that trigger actions or queries.

Type array
Array values object
Configurability Inspector > Interaction > Event handlers
Defaultnull
Array Object Properties

event​

The event that triggers the action. Refer to the events section for details of available events for this object.

Type string
Configurability Inspector > Interaction > Event handlers > Event
Defaultnull

method​

The JavaScript method to perform when type is datasource, widget, state, or localStorage.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Run script actions
Defaultnull

type​

The type of action to perform.

Type string
Configurability Inspector > Interaction > Event handlers > Edit event handler > Action
Allowed Values
ValueDescription
datasource

Control query.

widget

Control component.

script

Run script.

state

Set variable.

localStorage

Set localStorage.

util

Perform utility action (e.g., Open URL or Confetti).

Defaultnull


gradientColorArray​

A list of colors to use when colorInputMode is gradientColorArray.

Type array
Format Color
Array values string
Configurability Inspector > Appearance > Color selection
Defaultnull

hidden​

Whether this object is hidden from view.

Type boolean
Format True/False
Configurability Inspector > Appearance > Hidden
Defaultfalse
Examples
falsetrue

id​

The unique identifier (name).

Type string
Format Plain Text
Configurability Inspector
DefaultfunnelChart1
Examples
falsequery1
falsebutton1

isHiddenOnDesktop​

Whether to show or hide this object in the desktop layout.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Show on desktop
Defaultfalse
Examples
falsetrue

isHiddenOnMobile​

Whether to show or hide this object in the mobile layout.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Show on mobile
Defaulttrue
Examples
falsetrue

legendPosition​

The position of the legend.

Type string
Configurability Inspector > Content > Add-ons > Legend position
Allowed Values
ValueUI OptionDescription
topAlign top

Top.

rightAlign right

Right.

bottomAlign bottom

Bottom.

leftAlign left

Left.

noneNo legend

None.

Defaultnull

maintainSpaceWhenHidden​

Whether to take up space on the canvas if hidden is true.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Maintain space when hidden
Defaultfalse
Examples
falsetrue

margin​

The amount of margin to render outside.

Type string
Format Plain Text
Configurability Inspector > Spacing > Margin
Allowed Values
ValueUI OptionDescription
4px 8pxNormal

Normal margin.

0None

No margin.

Default4px 8px
Examples
false4px 8px

paperBgColor​

The paper background color.

Type string
Configurability Read-only
Defaultnull

plotBgColor​

The plot background color.

Type string
Configurability Read-only
Defaultnull

selectedPoints​

A list of selected points.

Type array
Array values object
Configurability Read-only
Defaultnull

series​

The chart series data.

Type object
Configurability Inspector
Defaultnull
Object Properties

yAxis​

The y-axis configuration.

Type object
Configurability Inspector
Defaultnull
Object Properties

lineWidth​

The width of the line.

Type number
Configurability Read-only
Defaultnull

rangeMax​

The maximum value of the axis.

Type number
Configurability Inspector
Defaultnull

rangeMin​

The minimum value of the axis.

Type number
Configurability Inspector
Defaultnull

rangeMode​

The range mode of the axis.

Type string
Configurability Inspector
Allowed Values
ValueDescription
auto

Auto.

manual

Manual.

Defaultnull

scale​

The scale of the axis.

Type string
Configurability Inspector
Allowed Values
ValueDescription
linear

Linear.

log

Logarithmic.

time
Defaultnull

showGridLines​

Whether to show grid lines on the axis.

Type boolean
Configurability Inspector
Defaultnull

showLine​

Whether to show the axis line.

Type boolean
Configurability Inspector
Defaultnull

showTickLabels​

Whether to show tick labels on the x-axis.

Type boolean
Configurability Inspector
Defaultnull

showZeroLine​

Whether to show the zero line on the x-axis.

Type boolean
Configurability Inspector
Defaultnull

sort​

The sorting of the axis.

Type string
Configurability Inspector
Allowed Values
ValueDescription
none

None.

ascending

Ascending.

descending

Descending.

Defaultnull

tickFormat​

The format of the axis tick labels.

Type string
Configurability Inspector
Defaultnull

title​

The axis title.

Type string
Configurability Inspector
Defaultnull


aggregationType​

The type of aggregation to use.

Type string
Format Plain Text
Configurability Inspector
Allowed Values
ValueDescription
none

None.

sum

Sum.

average

Average.

count

Count.

countDistinct

Count of distinct values.

max

Maximum.

min

Minimum.

median

Median.

mode

Mode.

standardDeviation

Standard deviation.

first

First Value.

last

Last Value.

Defaultnone
Examples
false"sum"

dataLabelPosition​

The position of the label relative to the input field or value.

Type string
Format Plain Text
Configurability Inspector > Content > Add-ons > Label > Position
Allowed Values
ValueUI OptionDescription
topTop

Above the input field or value.

leftLeft

Left of the input field or value.

Defaultleft
Examples
falsetop

dataLabelTemplate​

The template for the data label.

Type string
Configurability Inspector
Defaultnull

datasource​

The source data when using UI Form.

Type array
Array values object
Configurability Inspector
Defaultnull

groupBy​

The column to group by.

Type array
Configurability Inspector
Defaultnull

groupByStyles​

The styles of grouped data.

Type string
Configurability Read-only
Defaultnull

hoverTemplate​

The tooltip template for displaying information when you hover over a point.

Type string
Format Plain Text
Configurability Inspector > Content > Add-ons > Tooltip
Default%{value}<br>%{percent}<extra></extra>
Examples
false%{value}<br>%{percent}<extra></extra>

lineColor​

The color of the line.

Type string
Format Color
Configurability Inspector > Content > Series > Appearance > Line color
Default#000000
Examples
false#000000
false#FFFFFF

lineDash​

The style of the line.

Type string
Configurability Inspector
Allowed Values
ValueDescription
solid

Solid.

dash

Dashed.

dot

Dotted.

Defaultnull

lineShape​

The shape of the line.

Type string
Configurability Inspector
Allowed Values
ValueDescription
linear

Linear.

spline

Spline.

hv

Horizontal-Vertical.

vh

Vertical-Horizontal.

hvh

Horizontal-Vertical-Horizontal.

vhv

Vertical-Horizontal-Vertical.

Defaultnull

lineWidth​

The width of the line.

Type number
Configurability Read-only
Defaultnull

markerBorderColor​

The border color of the marker.

Type string
Configurability Inspector
Defaultnull

markerBorderWidth​

The border width of the marker.

Type number
Configurability Inspector
Defaultnull

markerColor​

The color of the marker.

Type string
Configurability Inspector
Defaultnull

markerSymbol​

The type of marker.

Type string
Configurability Inspector
Allowed Values
ValueDescription
circle

Circle.

square

Square.

diamond

Diamond.

Defaultnull

name​

The name.

Type string
Configurability Read-only
Defaultnull

showMarkers​

Whether to show markers for data points.

Type boolean
Configurability Inspector
Defaultnull

type​

The type of series to display.

Type string
Configurability Inspector
Allowed Values
ValueDescription
line

Line.

bar

Bar.

scatter

Scatter.

waterfall

Waterfall.

Defaultnull

xData​

The x-axis data.

Type array
Array values object
Configurability Read-only
Defaultnull

yData​

The y-axis data.

Type array
Configurability Read-only
Defaultnull


showInEditor​

Whether the component remains visible in the editor if hidden is true.

Type boolean
Format True/False
Configurability Inspector > Appearance > Advanced > Always show in edit mode
Defaultfalse
Examples
falsetrue

toolbar​

The toolbar configuration.

Type object
Configurability Inspector > Content > Add-ons > Toolbar
Defaultnull
Object Properties

showAutoscale​

Whether to show the Autoscale button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showBoxSelect​

Whether to show the Box select button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showLassoSelect​

Whether to show the Lasso select button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showPan​

Whether to show the Pan button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showResetViews​

Whether to show the Reset view button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showToImage​

Whether to show the Download as PNG button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showZoomIn​

Whether to show the Zoom in button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showZoomOut​

Whether to show the Zoom out button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue

showZoomSelect​

Whether to show the Zoom select button.

Type boolean
Format True/False
Configurability Inspector
Defaultnull
Examples
falsetrue


Methods​

JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.

funnelChart.scrollIntoView()​

Scrolls the canvas or parent container so that the selected component appears in the visible area.

Definition
funnelChart.scrollIntoView(options)
Parameters

options​

The scroll options.

Type object
Object Properties

behavior​

The scroll behavior.

Type string
Allowed Values
ValueDescription
auto

Scroll immediately to the specified position.

smooth

Scroll gradually to the specified position.


block​

The scroll position relative to the component.

Type string
Allowed Values
ValueDescription
nearest

Scrolls only the minimum amount required for the component to appear in the visible area. Scrolling does not occur if the component is already in view.

start

Scrolls to position the component at the top of the visible area.

center

Scrolls to position the component in the middle of the visible area.

end

Scrolls to position the component at the bottom of the visible area.



Examples

Scroll the minimum amount to immediately bring funnelChart into view.

funnelChart.scrollIntoView({behavior: 'auto', block: 'nearest'});

funnelChart.setHidden()​

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

Definition
funnelChart.setHidden(hidden)
Parameters

hidden​

Whether this object is hidden from view.

Type boolean
Format True/False
Default
false
Examples
true

Examples

Hide funnelChart.

funnelChart.setHidden(true);

Unhide funnelChart.

funnelChart.setHidden(false);

Events​

Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.

EventDescription
ClearA value is cleared.
HoverAn item is hovered over.
Legend ClickA legend item is clicked or pressed.
Legend Double ClickA legend item is double-clicked or pressed.
SelectA value is selected.
UnhoverAn item is no longer hovered over.