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 - JSON Data

To bind the Funnel to data in a JSON format, assign the data's URL to the dataSource option.

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        dataSource: "http://www.example.com/dataservices/data.json",
        argumentField: 'arg',
        valueField: 'val'
    });
});
Angular
HTML
TypeScript
<dx-funnel
    dataSource="http://www.example.com/dataservices/data.json"
    argumentField="arg"
    valueField="val">
</dx-funnel>
import { DxFunnelModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})

Note that you can also use a JSONP callback parameter supported by jQuery.ajax().

jQuery
JavaScript
$(function() {
    $("#funnelContainer").dxFunnel({
        dataSource: "http://www.example.com/dataservices/jsonpdata?callback=?",
        argumentField: 'arg',
        valueField: 'val'
    });
});
Angular
HTML
TypeScript
<dx-funnel
    dataSource="http://www.example.com/dataservices/jsonpdata?callback=?"
    argumentField="arg"
    valueField="val">
</dx-funnel>
import { DxFunnelModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxFunnelModule
    ],
    // ...
})

If you need to process data after obtaining it, implement the CustomStore. For details, see the Custom Sources topic.

See Also