<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Introduction to Sankey Diagrams]]></title><description><![CDATA[Introduction to Sankey Diagrams]]></description><link>https://introduction-to-sankey-diagrams.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sat, 20 Jun 2026 09:14:30 GMT</lastBuildDate><atom:link href="https://introduction-to-sankey-diagrams.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Sankey Diagrams]]></title><description><![CDATA[Sankey diagrams are powerful tools for visualizing flows of data, showing how values move from one set of categories to another. They are particularly useful for displaying energy flows, financial transfers, or user journeys etc.
A sankey diagram con...]]></description><link>https://introduction-to-sankey-diagrams.hashnode.dev/sankey-diagrams</link><guid isPermaLink="true">https://introduction-to-sankey-diagrams.hashnode.dev/sankey-diagrams</guid><category><![CDATA[sankey-diagram]]></category><category><![CDATA[mermaidmarkdown]]></category><category><![CDATA[dataviz]]></category><category><![CDATA[MermaidJS]]></category><category><![CDATA[mermaid evening gown]]></category><category><![CDATA[Mermaid Syntax]]></category><dc:creator><![CDATA[Giri Naresh Allu]]></dc:creator><pubDate>Sun, 21 Dec 2025 10:24:58 GMT</pubDate><content:encoded><![CDATA[<p>Sankey diagrams are powerful tools for visualizing flows of data, showing how values move from one set of categories to another. They are particularly useful for displaying energy flows, financial transfers, or user journeys etc.</p>
<p>A sankey diagram consists of nodes (representing categories) and links (showing the flow between these categories). The width of each link is proportional to the flow quantity it represents, making it easy to compare different flows.</p>
<p>Here’s as an example of sankey diagram showing the income flow (Source: <a target="_blank" href="https://www.appeconomyinsights.com/p/nvidia-industrial-revolution">App Economy Insights</a>)</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766311945584/d4438027-c340-4537-8c3f-7f00320d5f87.webp" alt class="image--center mx-auto" /></p>
<blockquote>
<p>Sankey diagrams are effective visual tools for illustrating data flows between categories, useful in areas like energy, finance, and user journeys. These diagrams feature nodes and links, with link widths proportionate to flow quantities. Mermaid.js offers an easy method to create Sankey diagrams using a CSV-like syntax. The process involves specifying source, target, and value to build a visual representation of data movements, with options for further customization.</p>
</blockquote>
<h2 id="heading-creating-sankey-diagrams-with-mermaidjs"><strong>Creating Sankey Diagrams with Mermaid.js</strong></h2>
<p>Mermaid.js provides a straightforward way to create Sankey diagrams using a syntax similar to CSV. Here’s how you can create one:</p>
<h3 id="heading-basic-syntax"><strong>Basic Syntax:</strong></h3>
<p>Start with the sankey-beta keyword, followed by your data in a CSV format with three columns: source, target, and value.</p>
<pre><code class="lang-javascript"><span class="hljs-string">``</span><span class="hljs-string">`mermaid
sankey-beta

%% source, target, value
Portfolio, Investments, 70 
Portfolio, Cash &amp; Equivalents, 30
Investments, Equities, 50
Investments, Bonds, 20
Equities, US, 30
Equities, Others, 20
`</span><span class="hljs-string">``</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1766312244482/d8c3edc6-6544-426b-96bd-31d9039afd5b.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-ending">Ending</h3>
<p>Sankey diagrams are an excellent way to visualize complex flows and relationships between different categories. With Mermaid.js, creating these diagrams becomes a simple and customizable process. You can start with a basic CSV format and enhance your diagram with various configuration options to meet your specific needs.</p>
<p>Note: these details are collected from various articles and blogs</p>
<p>For more detailed information and advanced configurations, visit the <a target="_blank" href="https://mermaid.js.org/syntax/sankey.html">Mermaid.js Sankey Diagram Documentation.</a></p>
]]></content:encoded></item></channel></rss>