React Funnel API

The Funnel is a widget that visualizes a value at different stages. It helps assess value changes throughout these stages and identify potential issues. The Funnel widget conveys information using different interactive elements (tooltips, labels, legend) and enables you to create not only a funnel, but also a pyramid chart.

import Funnel from "devextreme-react/funnel"
Type: FunnelTypes.default

Configuration

This section describes options that configure the Funnel widget's contents, behavior and appearance.

Name Description
adaptiveLayout

Specifies adaptive layout options.

algorithm

Specifies the algorithm for building the funnel.

argumentField

Specifies which data source field provides arguments for funnel items. The argument identifies a funnel item and represents it on the legend.

colorField

Specifies which data source field provides colors for funnel items. If this field is absent, the palette provides the colors.

dataSource

Binds the widget to data.

disabled

Specifies whether the widget responds to user interaction.

elementAttr

Specifies the attributes to be attached to the widget's root element.

export

Configures the exporting and printing features.

hoverEnabled

Specifies whether funnel items change their style when a user pauses on them.

inverted

Turns the funnel upside down.

item

Configures funnel items' appearance.

label

Configures funnel item labels.

legend

Configures the legend.

loadingIndicator

Configures the loading indicator.

margin

Generates space around the widget.

neckHeight

Specifies the ratio between the height of the neck and that of the whole funnel. Accepts values from 0 to 1. Applies only if the algorithm is "dynamicHeight".

neckWidth

Specifies the ratio between the width of the neck and that of the whole funnel. Accepts values from 0 to 1. Applies only if the algorithm is "dynamicHeight".

onDisposing

A function that is executed before the widget is disposed of.

onDrawn

A function that is executed when the widget's rendering has finished.

onExported

A function that is executed after the widget is exported.

onExporting

A function that is executed before the widget is exported.

onFileSaving

A function that is executed before a file with exported widget is saved to the user's local storage.

onHoverChanged

A function that is executed after the pointer enters or leaves a funnel item.

onIncidentOccurred

A function that is executed when an error or warning occurs.

onInitialized

A function used in JavaScript frameworks to save the widget instance.

onItemClick

A function that is executed when a funnel item is clicked or tapped.

onLegendClick

A function that is executed when a legend item is clicked or tapped.

onOptionChanged

A function that is executed after a widget option is changed.

onSelectionChanged

A function that is executed when a funnel item is selected or selection is canceled.

palette

Sets the palette to be used to colorize funnel items.

paletteExtensionMode

Specifies what to do with colors in the palette when their number is less than the number of funnel items.

pathModified

Notifies the widget that it is embedded into an HTML page that uses a tag modifying the path.

redrawOnResize

Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.

resolveLabelOverlapping

Specifies how item labels should behave when they overlap.

rtlEnabled

Switches the widget to a right-to-left representation.

selectionMode

Specifies whether a single or multiple funnel items can be in the selected state at a time. Assigning "none" disables the selection feature.

size

Specifies the widget's size in pixels.

sortData

Specifies whether to sort funnel items.

theme

Sets the name of the theme the widget uses.

title

Configures the widget's title.

tooltip

Configures tooltips - small pop-up rectangles that display information about a data-visualizing widget element being pressed or hovered over with the mouse pointer.

valueField

Specifies which data source field provides values for funnel items. The value defines a funnel item's area.

See Also

Methods

This section describes the methods that control the Funnel widget.

Name Description
beginUpdate()

Prevents the widget from refreshing until the endUpdate() method is called.

clearSelection()

Cancels the selection of all funnel items.

dispose()

Disposes of all the resources allocated to the Funnel instance.

element()

Gets the root widget element.

endUpdate()

Refreshes the widget after a call of the beginUpdate() method.

exportTo(fileName, format)

Exports the widget.

getAllItems()

Provides access to all funnel items.

getDataSource()

Gets the DataSource instance.

getInstance(element)

Gets the instance of a widget found using its DOM node.

getSize()

Gets the current widget size.

hideLoadingIndicator()

Hides the loading indicator.

hideTooltip()

Hides all widget tooltips.

instance()

Gets the widget's instance. Use it to access other methods of the widget.

off(eventName)

Detaches all event handlers from a single event.

off(eventName, eventHandler)

Detaches a particular event handler from a single event.

on(eventName, eventHandler)

Subscribes to an event.

on(events)

Subscribes to events.

option()

Gets all widget options.

option(optionName)

Gets the value of a single option.

option(optionName, optionValue)

Updates the value of a single option.

option(options)

Updates the values of several options.

print()

Opens the browser's print window.

render()

Redraws the widget.

resetOption(optionName)

Resets an option to its default value.

showLoadingIndicator()

Shows the loading indicator.

svg()

Gets the widget's SVG markup.

See Also

Events

This section describes events that the Funnel widget raises.

Name Description
disposing

Raised before the widget is disposed of.

drawn

Raised when the widget's rendering has finished.

exported

Raised after the widget is exported.

exporting

Raised before the widget is exported.

fileSaving

Raised before a file with exported widget is saved to the user's local storage.

hoverChanged

Raised after the pointer enters or leaves a funnel item.

incidentOccurred

Raised when an error or warning occurs.

initialized

Raised only once, after the widget is initialized.

itemClick

Raised when a funnel item is clicked or tapped.

legendClick

Raised when a legend item is clicked or tapped.

optionChanged

Raised after a widget option is changed.

selectionChanged

Raised when a funnel item is selected or selection is canceled.

See Also

Item

This section describes the Item object, which represents a funnel item.

The Item object is passed to most event handlers and callback functions in an argument's field. You can also access Item objects using the getAllItems() method.