Funnel

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.

Included in: dx.viz.js, dx.viz-web.js, dx.all.js
Module: viz/funnel
Export: default
Funnel interactive configuration
Copy Code
Copy to Codepen
$("#funnel").dxFunnel({
});

You can create the Funnel widget using one of the following approaches:

jQuery
JavaScript
HTML
var userStatistics = [
    { action: "Visited the Website", users: 9152 },
    { action: "Downloaded a Trial", users: 6879 },
    { action: "Contacted Support", users: 5121 },
    { action: "Subscribed", users: 2224 },
    { action: "Renewed", users: 1670 }
];

$(function() {
    $("#funnel").dxFunnel({
        dataSource: userStatistics,
        argumentField: "action",
        valueField: "users"
    });
});
<div id="funnel"></div>
Angular
HTML
TypeScript
<dx-funnel
    [dataSource]="userStatistics"
    argumentField="action"
    valueField="users">
</dx-funnel>
import { DxFunnelModule } from 'devextreme-angular';
// ...
export class AppComponent {
    userStatistics = [
        { action: "Visited the Website", users: 9152 },
        { action: "Downloaded a Trial", users: 6879 },
        { action: "Contacted Support", users: 5121 },
        { action: "Subscribed", users: 2224 },
        { action: "Renewed", users: 1670 }
    ];
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})
AngularJS
HTML
JavaScript
<div ng-controller="DemoController">
    <div dx-funnel="{
        dataSource: userStatistics,
        argumentField: 'action',
        valueField: 'users'
    }"></div>
</div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.userStatistics = [
            { action: "Visited the Website", users: 9152 },
            { action: "Downloaded a Trial", users: 6879 },
            { action: "Contacted Support", users: 5121 },
            { action: "Subscribed", users: 2224 },
            { action: "Renewed", users: 1670 }
        ];
    });
Knockout
HTML
JavaScript
<div data-bind="dxFunnel: {
    dataSource: userStatistics,
    argumentField: 'action',
    valueField: 'users'
}"></div>
var viewModel = {
    userStatistics: [
        { action: "Visited the Website", users: 9152 },
        { action: "Downloaded a Trial", users: 6879 },
        { action: "Contacted Support", users: 5121 },
        { action: "Subscribed", users: 2224 },
        { action: "Renewed", users: 1670 }
    ]
};

ko.applyBindings(viewModel);
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().Funnel()
    .ID("funnel")
    .DataSource(new List<object> {
        new { Action = "Visited the Website", Users = 9152 },
        new { Action = "Downloaded a Trial", Users = 6879 },
        new { Action = "Contacted Support", Users = 5121 },
        new { Action = "Subscribed", Users = 2224 },
        new { Action = "Renewed", Users = 1670 }
    })
    .ArgumentField("Action")
    .ValueField("Users")
)
@(Html.DevExtreme().Funnel() _
    .ID("funnel") _
    .DataSource(New List(Of Object) From {
        New With { .Action = "Visited the Website", .Users = 9152 },
        New With { .Action = "Downloaded a Trial", .Users = 6879 },
        New With { .Action = "Contacted Support", .Users = 5121 },
        New With { .Action = "Subscribed", .Users = 2224 },
        New With { .Action = "Renewed", .Users = 1670 }
    }) _
    .ArgumentField("Action") _
    .ValueField("Users")
)

View Demo

See Also

Configuration

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

See Also

Methods

This section describes the methods that control the Funnel widget.

See Also

Events

This section describes events that the Funnel widget raises.

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.