All docs
V19.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - OData Service

To bind the Funnel to data provided by an OData service, use the ODataStore.

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        dataSource: new DevExpress.data.DataSource({
            store: {
                type: 'odata',
                url: 'http://www.example.com/dataservices/odata/targetData',
                key: 'Id'
            },
            paginate: false
        }),
        argumentField: 'arg',
        valueField: 'val'
    });
});
Angular
TypeScript
HTML
import { DxFunnelModule } from "devextreme-angular";
import "devextreme/data/odata/store";
import DataSource from "devextreme/data/data_source";
// ...
export class AppComponent {
    funnelDataSource = new DataSource({
        store: {
            type: 'odata',
            url: 'http://www.example.com/dataservices/odata/targetData',
            key: 'Id'
        },
        paginate: false
    });
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})
<dx-funnel
    [dataSource]="funnelDataSource"
    argumentField="arg"
    valueField="val">
</dx-funnel>

As you may notice, in the previous code, the ODataStore is not declared explicilty. Instead, it is wrapped in the DataSource instance. That is because the Funnel requires pagination to be off in order to prevent data from partitioning. Other than that, the DataSource provides wide data-processing capabilities. For example, it can filter data.

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        dataSource: new DevExpress.data.DataSource({
            store: {
                type: 'odata',
                url: 'http://www.example.com/dataservices/odata/targetData',
                key: 'Id'
            },
            paginate: false,
            filter: [
                ['Id', '>=', 6],
                ['Id', '<=', 8]
            ]
        }),
        argumentField: 'arg',
        valueField: 'val'
    });
});
Angular
TypeScript
HTML
import { DxFunnelModule } from "devextreme-angular";
import "devextreme/data/odata/store";
import DataSource from "devextreme/data/data_source";
// ...
export class AppComponent {
    funnelDataSource = new DataSource({
        store: {
            type: 'odata',
            url: 'http://www.example.com/dataservices/odata/targetData',
            key: 'Id'
        },
        paginate: false,
        filter: [
            ['Id', '>=', 6],
            ['Id', '<=', 8]
        ]
    });
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})
<dx-funnel
    [dataSource]="funnelDataSource"
    argumentField="arg"
    valueField="val">
</dx-funnel>
See Also