React 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.js
  • import Sankey from 'devextreme-react/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 function App() {
  • return (
  • <Sankey dataSource={sankeyDataSource}>
  • {/* ... */}
  • </Sankey>
  • );
  • }
See Also