JavaScript/jQuery Sankey - OData Service

To bind the Sankey to data from an OData service, use the ODataStore. You should declare it inside the DataSource configuration object because the Sankey UI component requires disabled pagination to prevent data from partitioning.

App.vue
  • <template>
  • <DxSankey :data-source="sankeyDataSource">
  • <!-- ... -->
  • </DxSankey>
  • </template>
  •  
  • <script>
  • import DxSankey from 'devextreme-vue/sankey';
  • import 'devextreme/data/odata/store';
  • import DataSource from 'devextreme/data/data_source';
  •  
  • const sankeyDataSource = new DataSource({
  • store: {
  • type: 'odata',
  • url: 'https://www.example.com/dataservices/odata/targetData',
  • key: ['from', 'to']
  • },
  • paginate: false
  • });
  •  
  • export default {
  • components: {
  • DxSankey
  • },
  • data() {
  • return {
  • sankeyDataSource
  • }
  • }
  • }
  • </script>
See Also