React Sankey - JSON Data

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

App.js
  • import Sankey from 'devextreme-react/sankey';
  •  
  • export default function App() {
  • return (
  • <Sankey dataSource="http://www.example.com/dataservices/data.json">
  • {/* ... */}
  • </Sankey>
  • );
  • }

Note that you can also use a JSONP callback parameter.

App.js
  • import Sankey from 'devextreme-react/sankey';
  •  
  • export default function App() {
  • return (
  • <Sankey dataSource="http://www.example.com/dataservices/jsonpdata?callback=?">
  • {/* ... */}
  • </Sankey>
  • );
  • }

You should implement the CustomStore if you need to process data after obtaining it. Refer to the Custom Sources topic for more information.

See Also