React Sankey Diagram – Interactive Data Flow Visualization
- Visualize and explore intricate flow systems using connected nodes and links.
- Engage with the Sankey Diagram through interactive features like tooltips, legends, and more.
- Enjoy smooth and clear data visualization with support for both vertical and horizontal layouts.
Trusted by the world’s leading companies
Overview
The React Sankey Diagram is a flow-based visualization that represents values proportionally, highlighting the movement or transfer between different stages of a process. It serves as a powerful tool for illustrating complex systems, energy distributions, or any workflow involving transfers across stages.
Why choose the Syncfusion React Sankey Diagram?
Interactive Sankey Diagram
The tooltip cursor enables users to interact with the Sankey Diagram and view detailed information about nodes and links.
Rich feature set
The React Sankey Diagram includes support for legends, orientations, labels, titles, themes, events, customizable nodes and links, as well as printing and exporting options.
Adapts to any resolution
The Sankey Diagram features a highly responsive layout with an optimized design for desktops, touchscreens, and mobile phones. It performs seamlessly across iOS, Android, and Windows devices.
Attractive, customizable themes
Offers modern, visually appealing designs with multiple built-in themes, including Material 3, Fluent 2, Tailwind CSS, Bootstrap, Material, and Fabric.
Elegant animation
The Sankey Diagram delivers smooth animations to display data with fluid and refined transitions.
React Sankey Diagram code example
Quickly get started with the React Sankey Diagram by using just a few lines of TSX code, as shown below. You can also explore our React Sankey example to learn how to render and configure the component effectively.
import { SankeyComponent, SankeyNodesCollectionDirective, SankeyNodeDirective, SankeyLinksCollectionDirective, SankeyLinkDirective, SankeyLegend, Inject } from'@syncfusion/ej2-react-charts';
import * as React from 'react';
class App extends React.Component<{}, {}> {
public nodes: any[] = [
{ id: 'Female', label: 'Female (58%)' },
{ id: 'Male', label: 'Male (42%)' },
{ id: 'Tablet', label: 'Tablet (12%)' },
{ id: 'Mobile', label: 'Mobile (40%)' },
{ id: 'Desktop', label: 'Desktop (48%)' },
{ id: '< 18', label: '< 18 years (8%)' },
{ id: '18-26', label: '18-26 years (35%)' },
{ id: '27-40', label: '27-40 years (38%)' },
{ id: '> 40', label: '> 40 years (19%)' }
];
public links: any[] = [
{ source: 'Female', target: 'Tablet', value: 12 },
{ source: 'Female', target: 'Mobile', value: 14 },
{ source: 'Female', target: 'Desktop', value: 32 },
{ source: 'Male', target: 'Mobile', value: 26 },
{ source: 'Male', target: 'Desktop', value: 16 },
{ source: 'Tablet', target: '< 18', value: 4 },
{ source: 'Tablet', target: '> 40', value: 8 },
{ source: 'Mobile', target: '< 18', value: 4 },
{ source: 'Mobile', target: '18-26', value: 24 },
{ source: 'Mobile', target: '27-40', value: 10 },
{ source: 'Mobile', target: '> 40', value: 2 },
{ source: 'Desktop', target: '18-26', value: 11 },
{ source: 'Desktop', target: '27-40', value: 28 },
{ source: 'Desktop', target: '> 40', value: 9 }
];
public render() {
return <SankeyComponent id="sankey" title="Device Usage" nodeStyle=
linkStyle= legendSettings=>
<Inject services={[SankeyLegend]} />
<SankeyNodesCollectionDirective>
{this.nodes.map((node) => (
<SankeyNodeDirective key={node.id} id={node.id} label=>
</SankeyNodeDirective>
))}
</SankeyNodesCollectionDirective>
<SankeyLinksCollectionDirective>
{this.links.map((link, i) => (
<SankeyLinkDirective key={`${link.sourceId}-${link.targetId}-${i}`} sourceId={link.source} targetId={link.target} value={link.value}>
</SankeyLinkDirective>
))}
</SankeyLinksCollectionDirective>
</SankeyComponent>
}
};
ReactDOM.render(<App />, document.getElementById('sankey') as HTMLElement);
Legend
The React Sankey Diagram supports customizable legends that offer additional details about nodes. When the pointer hovers over a legend item, the corresponding data flow links are highlighted.
Tooltips
The Sankey Diagram provides tooltip options that display information about node and link values when the pointer is placed over them.


Print and export
Export the React Sankey Diagram as a PDF file or as image formats such as PNG and JPEG on the client side. You can also print the rendered Sankey Diagram directly from the browser.
Orientation
The Sankey Diagram supports both horizontal and vertical layouts, enabling flexible data visualization based on the data’s flow and layout needs.


Node labels
The Sankey Diagram supports labels for annotating node details, improving the overall readability and clarity of the visualization.
Customization
The Sankey Diagram includes built-in APIs to customize node widths and the colors of nodes, links, and labels, helping align the visualization with your design requirements.

Accessibility

Keyboard navigation
All elements in the Sankey Diagram are fully accessible via keyboard, with key features such as legend highlighting operable using keyboard commands alone. Mouse interaction is not required, ensuring a highly accessible user experience.

Screen readers
The Sankey Diagram offers complete WAI-ARIA accessibility support, ensuring compatibility with assistive technologies such as screen readers. Its interface includes high-contrast visual elements for users with low vision, along with easily accessible and valid UI descriptions to enhance usability.

Right to left (RTL)
Right-to-left rendering presents the Sankey Diagram’s text and layout from right to left, improving usability and accessibility for users of RTL languages.
Not sure how to create your first React Sankey Diagram component? Our documentation can help.
I’d love to read it nowDiscover Syncfusion’s Complete React Component Ecosystem
Explore over 145+ React UI components featuring established, production-ready controls and the latest pure React components built natively for modern web app development.
-
React Components
-
Pure React Components
-
SMART COMPONENTSGRIDSDATA VISUALIZATIONDROPDOWNSFILE VIEWERS & EDITORSBUTTONSINTERACTIVE CHATINPUTSNAVIGATIONFORMSNOTIFICATIONS
-
GRIDSDATA VISUALIZATIONNAVIGATIONINPUTSCALENDARSDROPDOWNS
Frequently Asked Questions
Why should you choose the Syncfusion® React Sankey Diagram component?
With the Syncfusion React Sankey Diagram component, you can:
- Visualize and analyze complex flow systems with nodes and links.
- Implement one of the best React Sankey Diagram components on the market.
- Enjoy simple configuration and APIs.
- Deploy confidently to all modern browsers.
- Implement a touch-friendly and responsive component.
- Take advantage of expansive learning resources such as demos and documentation to get started quickly.
Where can I find the Syncfusion React Sankey Diagram demo?
You can find our React Sankey demo here, which demonstrates how to render and configure the Sankey Diagram.
Can I download and utilize the Syncfusion React Sankey Diagram component for free?
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
How do I get started with the Syncfusion React Sankey Diagram?
A good place to start would be our comprehensive getting started documentation.
Our Customers Love Us
Awards
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.