Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted 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?

React Sankey Interactive image

Interactive Sankey Diagram

The tooltip cursor enables users to interact with the Sankey Diagram and view detailed information about nodes and links.

React Sankey Rich Feature Set image

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.

React Sankey Adapts To Any Resolution image

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.

React Sankey Customizable Themes image

Attractive, customizable themes

Offers modern, visually appealing designs with multiple built-in themes, including Material 3, Fluent 2, Tailwind CSS, Bootstrap, Material, and Fabric.

React Sankey Elegant Animation image

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 in React Sankey.

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.

Tooltip in React Sankey Diagram.


Print and export in React Sankey Diagram.

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.

Orientations in React Sankey Diagram.


Node labels in React Sankey Diagram.

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.

Customization in React Sankey Diagram.


Accessibility

Keyboard navigation in React Sankey Diagram.

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.

Accessibility and screen reader support in React Sankey Diagram.

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.

Show right-to-left language in React Sankey Diagram.

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.




Other Supported Frameworks

In addition to React, built-in integration is available for these major frameworks.

Discover 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

Frequently Asked Questions

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.

You can find our React Sankey demo here, which demonstrates how to render and configure the Sankey Diagram.

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.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion® reduces customers’ development time.
Here are some of their experiences.

See Real Success Stories

Developers around the world trust Syncfusion’s Essential Studio to simplify complex projects and speed up delivery. With a vast library of UI controls, powerful SDKs, and reliable support, Essential Studio helps teams build enterprise-ready applications with confidence.

Read Our Customer Stories


Rated by users across the globe

Transform your applications today by downloading our free evaluation version
Download Free Trial No credit card required.

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.

Up arrow icon