We are excited to announce a new addition to the TeeChart for .NET charting library: the Sankey series. Known for its unique ability to visualize flow and relationships between entities, the Sankey diagram is a powerful tool that enables developers to communicate complex data in an intuitive, easy-to-read format.
In this blog post, we’ll explore the typical use cases for Sankey diagrams, why they are beneficial, and how to get started using them in your applications with TeeChart for .NET.
What Is a Sankey Diagram?
A Sankey diagram is a type of flow diagram in which the width of the arrows or paths is proportional to the flow quantity. It’s often used to visualize data where tracking how quantities move or split through a system is important.
The diagram consists of nodes (representing entities or stages in a process) and links (which show the flow between these nodes). The width of each link is proportional to the magnitude of the flow it represents.
Common Use Cases for Sankey Diagrams
Sankey diagrams are widely used across industries for their ability to depict flow in a meaningful way. Here are some of the most common scenarios where they shine:
- Energy Flow Analysis: Visualizing the flow of energy from sources (like coal, gas, renewables) through conversion processes to final consumption sectors.
- User Journey or Website Navigation: Understanding how users move through a website, where they enter, what paths they take, and where they drop off.
- Financial Transfers: Displaying how budgets or funds are allocated from sources to departments or projects.
- Supply Chain Management: Mapping how products or materials flow through different stages of production and distribution.
- Process Optimization: Identifying inefficiencies or bottlenecks by showing how materials, tasks, or costs flow through a system.
Why Use Sankey Diagrams?
The key benefits of Sankey diagrams include:
- Clear Flow Representation: They offer a clear and proportional view of how quantities move between entities.
- Insight into Relationships: Helps to identify key contributors or recipients in a process.
- Enhanced Decision-Making: By visualizing flows, teams can quickly identify inefficiencies or areas for improvement.
- Aesthetically Pleasing: Sankey diagrams are not only informative but also visually engaging, often improving user interaction with the data.
Sankey Diagrams in TeeChart for .NET
With the introduction of the Sankey series in TeeChart for .NET, developers now have access to a high-performance, customizable component to easily integrate these powerful visualizations into their applications.
Here’s a quick look at how to implement a basic Sankey chart using C#:
<code> var datas = new List<SankeyData>() { new SankeyData("A1", "B1", 8), new SankeyData("A2", "B2", 4), new SankeyData("A1", "B2", 2), new SankeyData("B1", "C1", 8), new SankeyData("B2", "C1", 4), new SankeyData("B2", "C2", 2), }; SankeyDatas = datas; SankeyShowLabels = true; tChart1.Panel.MarginTop = 0; tChart1.Panel.MarginBottom = 3; tChart1.Panel.MarginLeft = 10; tChart1.Panel.MarginRight = 10; sdiag = new Steema.TeeChart.Styles.Sankey(tChart1.Chart); sdiag.FillSampleValues(); sdiag.LinkCurvature = 0.70F; // 0.95F; sdiag.SankeyFlowDirection = Steema.TeeChart.Styles.FlowDirection.LeftToRight; sdiag.FirstAndLastLabelPosition = FirstAndLastLabelPosition.Inward;</code>
This example sets up a basic Sankey diagram showing how specific data is distributed between others, and how those categories are further subdivided. The code also demonstrates enabling interactive features and customizing the appearance.
Customization and Interactivity
TeeChart’s Sankey series supports extensive customization options, including:
- Node and link color modes (by source, target, or custom)
- Label positioning and formatting
- Link Curvature.
- Automatic layout calculation
- Flow Direction.
These features make it easy to tailor the chart to your application’s specific visual and interactive requirements.
A New Dimension in Data Visualization
With the new Sankey series, TeeChart for .NET gives developers an effective new way to represent flow data. Whether you’re analyzing for example energy systems, user behavior, or financial movements, the Sankey diagram offers a level of clarity and insight that few other chart types can match.
We encourage you to try it out in your own projects and see how it can elevate your data visualizations. As always, we welcome your feedback and suggestions as we continue to enhance TeeChart for .NET.
You can also find a sankey example at the TeeNew Demo as well as other TeeChart examples.
Stay tuned for future updates and more powerful charting capabilities!