# Sankey Charts

### **Chart setup to build a sankey chart:**

{% stepper %}
{% step %}

#### **Axis**

Drag the dimension to plot on the vertical axes (e.g., Region, Gender, Age group, Mode).
{% endstep %}

{% step %}

#### **Values parameter**

Drag the measures to analyze (e.g., Order).
{% endstep %}

{% step %}

#### **Chart type**

Select **Horizontal Sankey** from the Special charts section of the Chart Type dropdown menu.
{% endstep %}
{% endstepper %}

> Sankey charts are a great way to visualize cash flows, resource allocation, or revenue distribution between various dimension categories. The nodes represent the categories, the flows depict the connections between categories, and the width of the flows shows the quantity.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F707ByvIDuV0W00ay4iv9%2Fimage.png?alt=media&#x26;token=07d0ca33-539d-4e91-913f-41347bcf439d" alt=""><figcaption><p>Data management for Sankey charts</p></figcaption></figure>

## **1. Customization & formatting options under Canvas settings**

#### 1.1. Ignore missing value

Display node categories that are null by enabling the **Ignore missing value** toggle.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FU2hyajpnTC8vAmTJFKeG%2Fimage.png?alt=media&#x26;token=5f714f67-fdf1-4b1b-a163-3d92906b6216" alt=""><figcaption><p>Ignore missing value</p></figcaption></figure>

* **Show blank label**

Replace missing node categories with "Blank", indicating the category is null.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FrvOwPrM7aAggxcCvRVyg%2Fimage.png?alt=media&#x26;token=253ddf1b-0361-4f51-94ff-59797dd860fb" alt=""><figcaption><p>Show blank label</p></figcaption></figure>

* Suppress null node categories by enabling the Ignore missing value toggle. Notice how the blank category is suppressed.&#x20;

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FT6uddivOp3dJSBcRMn5d%2Fimage.png?alt=media&#x26;token=d347578b-6031-466b-beda-4721cd4d3063" alt=""><figcaption><p>Null node categories are supressed</p></figcaption></figure>

#### 1.2. Remove negative values

This toggle should be disabled to display negative values in Sankey charts. The absolute value will be displayed without the negative sign.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F1W0LpPpvGYIimmPn2Jqw%2Fimage.png?alt=media&#x26;token=c21b4c85-e876-4776-a2d8-c845146c8cfe" alt=""><figcaption><p>Remove negative values</p></figcaption></figure>

#### 1.2. Interaction

* **Enable Hover**

Enable this option to highlight a flow when you hover over it.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2F8tfUni343pZMI5vSDns8%2FUntitled%20Project.gif?alt=media&#x26;token=3520d42b-57e4-450a-afd6-43f04da83200" alt=""><figcaption><p>Hover interaction</p></figcaption></figure>

* **Active flow opacity**

Set the opacity of the selected flow.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FgIy5F2t77F0b00a02oKH%2Fimage.png?alt=media&#x26;token=ad9ceb2a-c53e-44c3-9758-9150c6f05cee" alt=""><figcaption><p>Active flow opacity</p></figcaption></figure>

* **Inactive flow opacity**

Set the opacity of flows that are not selected.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FfUlnl6EyHV98ryoIivNe%2Fimage.png?alt=media&#x26;token=9da57e91-8afc-4dd0-a1b6-8a95799b3fd4" alt=""><figcaption><p>Inactive flow opacity</p></figcaption></figure>

#### 1.3. Node

* Width: Set the thickness of the node bars.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FbPrbVh75Uy7tsgOr7Kr1%2Fimage.png?alt=media&#x26;token=d4c3f891-7b36-4f36-8b40-6360539a6546" alt=""><figcaption><p>Node width</p></figcaption></figure>

* Padding: Allocate space between the node bars and flows.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FEexs9FR9eegs6dZ9rvQb%2Fimage.png?alt=media&#x26;token=34ec5a9e-faa8-4f8a-b1fd-a87cd91bbcea" alt=""><figcaption><p>Padding</p></figcaption></figure>

* Node spacing: Set the spacing between nodes of the same dimension.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FGV8s5mY2mFbFntYE0svz%2Fimage.png?alt=media&#x26;token=7790e43c-e118-48ed-a775-1065ec0234e4" alt=""><figcaption><p>Node spacing</p></figcaption></figure>

* Opacity: Set the transparency for the nodes.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FJaOAAInSjL1RC88wOOIw%2Fimage.png?alt=media&#x26;token=8fb149e7-5a73-4501-bbea-26e836036cf4" alt=""><figcaption><p>Opacity</p></figcaption></figure>

#### 1.4. Node color

Set a color to identify each dimension category.

<figure><img src="https://3132984990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbOoZhPvC57Z0CNgep4Ib%2Fuploads%2FlTddENKb9ghFRECO2zuk%2Fimage.png?alt=media&#x26;token=49372a85-db51-416e-aa30-2d672ac7cce4" alt=""><figcaption><p>Node colors</p></figcaption></figure>

## Additional formatting options

Here are the other settings that help you refine your Sankey chart.

<table><thead><tr><th width="143.5">Feature</th><th>Description</th><th data-type="content-ref">Link</th></tr></thead><tbody><tr><td>Number</td><td>Configure number formatting (decimals, units)</td><td><a href="../../working-with-analytics+/3.-charts/3.8.-display-settings-for-charts/charts-number-settings">charts-number-settings</a></td></tr><tr><td>Legend</td><td>Show/hide and customize the legends</td><td><a href="../../working-with-analytics+/3.-charts/3.8.-display-settings-for-charts/charts-legend-settings">charts-legend-settings</a></td></tr><tr><td>Data Label</td><td>Show exact values for each data point</td><td><a href="../../working-with-analytics+/3.-charts/3.6.-data-label-customizations">3.6.-data-label-customizations</a></td></tr><tr><td>Trellis</td><td>Create small multiples using category split</td><td><a href="../../working-with-analytics+/6.-trellis-customizations">6.-trellis-customizations</a></td></tr><tr><td>Conditional Formatting</td><td>Apply color rules to highlight values</td><td><a href="../../working-with-analytics+/9.-conditional-formatting">9.-conditional-formatting</a></td></tr><tr><td>Sorting</td><td>Sort axis order</td><td><a href="../../working-with-analytics+/10.-sort-and-reorder-data/sorting-data">sorting-data</a></td></tr><tr><td>Ranking</td><td>Limit to top/bottom N categories</td><td><a href="../../working-with-analytics+/11.-ranking-data-topn/ranking-for-charts">ranking-for-charts</a></td></tr></tbody></table>
