JavaScript/jQuery Funnel API

The Funnel is a UI component that visualizes a value at different stages. It helps assess value changes throughout these stages and identify potential issues. The Funnel UI component 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/viz/funnel"
Type:

Object

Configuration

This section describes properties that configure the Funnel UI component's contents, behavior and appearance.

Name Description
adaptiveLayout

Specifies adaptive layout properties.

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 UI component to data.

disabled

Specifies whether the UI component responds to user interaction.

elementAttr

Specifies the global attributes to be attached to the UI component's container 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 UI component.

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 UI component is disposed of.

onDrawn

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

onExported

A function that is executed after the UI component is exported.

onExporting

A function that is executed before the UI component is exported.

onFileSaving

A function that is executed before a file with exported UI component 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 UI component 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 UI component property 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 UI component that it is embedded into an HTML page that uses a tag modifying the path.

redrawOnResize

Specifies whether to redraw the UI component 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 UI component 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 UI component's size in pixels.

sortData

Specifies whether to sort funnel items.

theme

Sets the name of the theme the UI component uses.

title

Configures the UI component's title.

tooltip

Configures tooltips - small pop-up rectangles that display information about a data-visualizing UI component 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 UI component.

Name Description
beginUpdate()

Prevents the UI component 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 UI component element.

endUpdate()

Refreshes the UI component after a call of the beginUpdate() method.

exportTo(fileName, format)

Exports the UI component.

getAllItems()

Provides access to all funnel items.

getDataSource()

Gets the DataSource instance.

getInstance(element)

Gets the instance of a UI component found using its DOM node.

getSize()

Gets the current UI component size.

hideLoadingIndicator()

Hides the loading indicator.

hideTooltip()

Hides all UI component tooltips.

instance()

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

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 UI component properties.

option(optionName)

Gets the value of a single property.

option(optionName, optionValue)

Updates the value of a single property.

option(options)

Updates the values of several properties.

print()

Opens the browser's print window.

render()

Redraws the UI component.

resetOption(optionName)

Resets an property to its default value.

showLoadingIndicator()

Shows the loading indicator.

svg()

Gets the UI component's SVG markup.

See Also

Events

This section describes events that the Funnel UI component raises.

Name Description
disposing

Raised before the UI component is disposed of.

drawn

Raised when the UI component's rendering has finished.

exported

Raised after the UI component is exported.

exporting

Raised before the UI component is exported.

fileSaving

Raised before a file with exported UI component 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 UI component 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 UI component property 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.