Skip to content

comark/charts/flow-columns

Give a sankey a column it flows from, one it flows to, and one of amounts

A sankey reads three columns: where each flow comes from, where it goes, and how much. The first column is where it comes from, unless x names another; the next column of names is where it goes; and the column of numbers is the amount, unless y names one.

Incorrect

pondducks
north12
south7
::chart{type="sankey" title="Where the ducks went"}
| pond | ducks |
| --- | --: |
| north | 12 |
| south | 7 |
::
md

Correct

Where the ducks went
the shopnorth pondsouth pond
Data
fromtoducks
the shopnorth pond12
the shopsouth pond7
::chart{type="sankey" title="Where the ducks went"}
| from | to | ducks |
| --- | --- | --: |
| the shop | north pond | 12 |
| the shop | south pond | 7 |
::
md