Syncfusion® Blazor Sankey component renders Sankey diagrams to visualize flow between nodes. Supports data binding, custom node/link templates, tooltips, animations, and styling options for nodes and links in Blazor applications.
Install
| Product | Versions |
|---|---|
| .NET |
README
Syncfusion® Blazor Sankey Component
The Syncfusion® Blazor Sankey Component visualizes complex data flows and relationships within Blazor applications. Ideal for displaying energy flows, financial transfers, process flows, and networked data with an intuitive, interactive interface.
Using this package with an AI coding agent
Before generating Syncfusion® code, ask your AI coding agent to run the Syncfusion® setup using the following prompt:
Set up this project for Syncfusion® before generating code. Fetch and follow the official instructions at https://ai.syncfusion.com, then report the detected platform, installed skill pack, MCP status, and any required licensing action.The setup detects your project's platform and loads the appropriate Syncfusion® skill pack. No Syncfusion® account or MCP key is required to install or read Syncfusion® agent skills.
Platform reference: https://ai.syncfusion.com/blazor/llms.txt
Key Features
- Interactive Data‑Flow Visualization - Clearly represent complex relationships, transfers, and flow quantities between stages using proportional node‑to‑node link widths.
- Customizable Node & Link Styling - Personalize node appearance (size, padding, labels, alignment) and link styling (color, opacity, gradients, source/target‑based coloring) to match any UI design.
- Orientation Flexibility - Choose between horizontal or vertical diagram layouts to best represent your process flow or screen layout.
- Rich Interactivity: Tooltips & Legends - Hover over nodes or links to reveal detailed flow information using tooltips, and use legends to help users interpret categories and values.
- Responsive & Adaptive Design - Automatically adapts to different screen sizes and devices with optimized layouts for desktop, tablet, and mobile.
- Smooth Animations - Enjoy fluid, polished visual transitions when nodes or links load or update, improving user engagement and clarity.
- Touch & Mobile Support - Full support for touch interactions, enabling smooth panning, selection, and exploration on mobile and tablet devices.
- Data Binding & Integration - Bind data from local collections or remote sources (Web APIs, JSON, etc.) and easily integrate the Sankey diagram within broader Blazor dashboards.
- Export & Printing Options - Export diagrams to PNG, JPEG, SVG, or PDF formats for reporting, sharing, or print outputs.
- Themes & Accessibility - Supports Material, Bootstrap, Fluent, Tailwind, and Fabric themes, along with ARIA accessibility, screen‑reader compatibility, keyboard navigation, and RTL layout support.
System Requirements
- .NET 8.0 or later (Blazor Web App, Blazor Server, Blazor WebAssembly and Blazor Hybrid)
- See full requirements: System Requirements
Installation
Install the Sankey package and the themes package, which provides the scripts referenced below:
dotnet add package Syncfusion.Blazor.Sankey
Add Script References
- For Blazor Server App / Blazor Web App, add these to
Components/App.razororApp.razor. - For Blazor WebAssembly App: add these to
wwwroot/index.html.
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
Quick Start
- Register the Syncfusion® Blazor services in
Program.cs:
using Syncfusion.Blazor;
builder.Services.AddSyncfusionBlazor();
- Add the Blazor Sankey component in a Razor page:
<SfSankey Nodes=@Nodes Links=@Links>
</SfSankey>
@code {
public List<SankeyDataNode> Nodes = new List<SankeyDataNode>();
public List<SankeyDataLink> Links = new List<SankeyDataLink>();
protected override void OnInitialized()
{
Nodes = new List<SankeyDataNode>()
{
new SankeyDataNode() { Id = "Coffee Production" },
new SankeyDataNode() { Id = "Arabica" },
new SankeyDataNode() { Id = "Robusta" },
new SankeyDataNode() { Id = "Roasted Coffee" },
new SankeyDataNode() { Id = "Instant Coffee" },
new SankeyDataNode() { Id = "Green Coffee" },
new SankeyDataNode() { Id = "North America" },
new SankeyDataNode() { Id = "Europe" },
new SankeyDataNode() { Id = "Asia Pacific" },
};
Links = new List<SankeyDataLink>()
{
new SankeyDataLink() { SourceId = "Coffee Production", TargetId = "Arabica", Value = 95 },
new SankeyDataLink() { SourceId = "Coffee Production", TargetId = "Robusta", Value = 65 },
new SankeyDataLink() { SourceId = "Arabica", TargetId = "Roasted Coffee", Value = 60 },
new SankeyDataLink() { SourceId = "Arabica", TargetId = "Instant Coffee", Value = 20 },
new SankeyDataLink() { SourceId = "Arabica", TargetId = "Green Coffee", Value = 15 },
new SankeyDataLink() { SourceId = "Robusta", TargetId = "Roasted Coffee", Value = 30 },
new SankeyDataLink() { SourceId = "Robusta", TargetId = "Instant Coffee", Value = 25 },
new SankeyDataLink() { SourceId = "Robusta", TargetId = "Green Coffee", Value = 10 },
new SankeyDataLink() { SourceId = "Roasted Coffee", TargetId = "North America", Value = 35 },
new SankeyDataLink() { SourceId = "Roasted Coffee", TargetId = "Europe", Value = 30 },
new SankeyDataLink() { SourceId = "Roasted Coffee", TargetId = "Asia Pacific", Value = 25 },
new SankeyDataLink() { SourceId = "Instant Coffee", TargetId = "North America", Value = 15 },
new SankeyDataLink() { SourceId = "Instant Coffee", TargetId = "Europe", Value = 15 },
new SankeyDataLink() { SourceId = "Instant Coffee", TargetId = "Asia Pacific", Value = 15 },
new SankeyDataLink() { SourceId = "Green Coffee", TargetId = "North America", Value = 10 },
new SankeyDataLink() { SourceId = "Green Coffee", TargetId = "Europe", Value = 8 },
new SankeyDataLink() { SourceId = "Green Coffee", TargetId = "Asia Pacific", Value = 7 },
};
base.OnInitialized();
}
}
Documentation
- Getting Started with Blazor Sankey in Web App
- Getting Started with Blazor Sankey in WASM App
- Feature Overview
- Live Demos
- API Reference
Support
License
This is a commercial product and requires a paid license for possession or use. Review the Syncfusion® EULA.
About Syncfusion®
Syncfusion® provides 1600+ UI components and frameworks for web, mobile, and desktop development across multiple platforms:
Web: Blazor | ASP.NET Core | ASP.NET MVC | JavaScript | Angular | React | Vue
Desktop: WinForms | WPF | WinUI
Learn more at www.syncfusion.com.
[email protected] | Toll Free: 1-888-9-DOTNET
Changes from Previous Version
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.