> For the complete documentation index, see [llms.txt](https://docs.buildings.ability.abb/collection/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.buildings.ability.abb/collection/english-v14/documentation/widgets/predefined-widgets/sankey-diagram.md).

# Sankey diagram

Sankey diagrams are particularly well suited for showing inflows and outflows for a quantity.

Since the inflows and outflows are displayed as arrows whose thickness is proportional to the quantity, energy flows, for example, can be made intuitively understandable.

<div data-full-width="true"><figure><img src="/files/d7077328bb29ed98f0116e7c85cc43e757dca601" alt=""><figcaption><p>A Sankey diagram with 2 inflows (left) and several outflows (right).</p></figcaption></figure></div>

## When should this display be used?&#x20;

The Sankey diagram should be used when you want to represent energy and material flows. Sankey diagrams are excellent for showing how much of the total output is consumed by individual consumers.

## Configure widget

{% @supademo/embed demoId="\_yIBx6mWTACoiIBCX7jqX" url="<https://app.supademo.com/demo/_yIBx6mWTACoiIBCX7jqX>" fullWidth="true" %}

1. Make sure you are in the "Dashboard" menu
2. Click "Add widget"
3. Click on "View"
4. Click on "Sankey overview"
5. Select the primary asset. The name of this asset will appear in the widget title bar.
6. Select an asset that should act as the source.&#x20;
7. Select the source attribute.
8. Choose whether the current value or the aggregated value should be used for calculations.
9. Optional: Repeat the last steps to create another source.
10. Select an asset that should act as the sink. A sink can, for example, be a consumer.&#x20;
11. Select the sink attribute.
12. Choose whether the current value or the aggregated value should be used for calculations.
13. Optional: Repeat the last steps to create another sink.
14. Optional: Choose how much space your new widget should take up on the dashboard.
15. Click "Add widget"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.buildings.ability.abb/collection/english-v14/documentation/widgets/predefined-widgets/sankey-diagram.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
