Share
Save
data
bind
style
animate
AI
code
info
settings
EN
Chart Info

Sankey Diagram

A Sankey diagram shows how quantities flow from one set of stages to the next. Each band connects two nodes and its width is proportional to the amount that flows between them, so the biggest paths and the biggest losses are visible immediately.

With the makechart.io chart maker you can create one from an ordinary table: list each flow as a row, bind the stage columns in order and a value column, and the nodes and links are laid out for you. Adjust node alignment, link colors and labels in the Style panel, then export or share.

Set up data
Paste, upload or pick sample data to make this chart.

Data format

One row per flow. Bind two or more columns to path, in order from the first stage to the last; neighboring cells in a row become a link. Rows with the same endpoints are added together, and an empty cell is skipped.

FieldType
path
required
Category (two or more columns)
Stages of the flow, such as source, intermediate step and destination. The order you bind them is the order from left to right.
value
required
Number
Amount of the flow, which sets the width of the band.
Example
sourceviatargetvalue
CoalElectricityIndustry30
CoalElectricityResidential18
Natural GasIndustrial HeatIndustry14
OilTransport FuelTransport40
RenewablesElectricityResidential8

When to use

  • Energy, material or money flows, such as an energy balance or where a budget goes.
  • User journeys and conversion funnels across several steps.
  • Showing how one categorization maps onto another, like survey answers before and after.

When not to use

  • Data that is not a flow or has no meaningful stages; a bar or stacked column chart is simpler.
  • Too many nodes per stage, which turns the links into an unreadable tangle. Group small items into "Other".
  • Comparing exact values between links; band widths give an overview, not precise numbers.

Tips

  • node merge decides whether nodes with the same name are the same node (name) or separated by column (column); auto treats two columns as an edge list and three or more as stages.
  • Use node align and node sort to tidy the layout, and link color (source, target or gradient) to make paths easier to follow.

Related charts

山基圖

山基圖在台灣更常被稱為桑基圖(Sankey Diagram),用來呈現數量如何從一個階段流向下一個階段。每條流帶連接兩個節點,寬度和流量成正比,最主要的流向與最大的流失一眼就能看出。

用 makechart.io 製作圖表,一般的表格就能畫:每一列寫一條流向,依序對應各階段欄位與一個數值欄位,節點與連線會自動排好。在「樣式」面板調整節點對齊、連線顏色與標籤,就能匯出或分享,完成這類流向的資料視覺化。

設定資料
貼上、上傳資料,或用範例資料開始製作這張圖表。

資料格式

每一列是一條流向。把兩個以上的欄位依序對應到 path,從第一個階段排到最後一個;同一列中相鄰的兩格就是一條連線。兩端相同的列會自動加總,空白的格子會被略過。

欄位型態
path
必填
分類(兩欄以上)
流向的各個階段,例如來源、中繼、去向。對應的順序就是由左到右的順序。
value
必填
數值
這條流向的數量,決定流帶的寬度。
範例
來源轉換用途數量
煤電力工業30
煤電力住宅18
天然氣工業用熱工業14
石油運輸燃料交通40
再生能源電力住宅8

適合的使用時機

  • 能源、物料或金流的流向,例如能源平衡表、預算的去處。
  • 使用者在多個步驟之間的動線與轉換漏斗。
  • 呈現一種分類如何對應到另一種分類,例如前後兩次問卷的答案變化。

不適合的情況

  • 資料不是流向、也沒有前後階段時,長條圖或堆積柱狀圖會更簡單。
  • 每個階段的節點太多,連線會糾結成一團;建議把小項目合併成「其他」。
  • 需要比較連線之間的精確數值時:流帶寬度適合看整體,不適合讀數字。

使用技巧

  • node 的 merge 決定同名的節點是否視為同一個(name),或依欄位分開(column);auto 在只有兩欄時當作邊列表,三欄以上則依欄位分層。
  • 用 node 的 align、sort 整理版面,link 的 color(source、target 或 gradient)讓流向更容易追蹤。

相關圖表

bind
Auto Bind
Clear
no dimension
Reset
no style
no matching style

s
%
code
Loading