> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/app-builder/build-frontend/widgets/display-widgets/sankey.md).

# Sankey

The sankey widget visualizes flow or process data across multiple operational stages. It uses nodes to represent entities and connecting links to illustrate distribution paths and quantities in your Apps.

<figure><img src="/files/SImhYDZ2qvxUZyRyb2VJ" alt="" width="563"><figcaption></figcaption></figure>

## Data binding

### Function output or modifier to widget

| **Property** | **Description**                                                                             | **Type** |
| ------------ | ------------------------------------------------------------------------------------------- | -------- |
| `data`       | An array of data objects, where each object defines an individual link in the process flow. | array    |

### Data structure

To render a Sankey chart, the bound `data` array must provide objects where each item represents a single connection in the flow. The widget requires a source node, a target node, and a numeric weight value to map the distribution profile.

For example, if you configure the `source` (Source key) as `"from"`, `target` (Target key) as `"to"`, and `weight` (Weight key) as `"amount"`, the array data payload should follow this structure:

```json
[
  { "from": "Coal", "to": "Power Plant", "amount": 100 },
  { "from": "Power Plant", "to": "Electricity Grid", "amount": 80 },
  { "from": "Power Plant", "to": "Heat Loss", "amount": 20 }
]
```

## Configuration

Set the widget's defaults in the settings panel.

### General settings

| **Property** | **Label**  | **Description**                                                                                    | **Type** |
| ------------ | ---------- | -------------------------------------------------------------------------------------------------- | -------- |
| `title`      | Title      | The text string displayed as a header at the top of the chart canvas.                              | string   |
| `source`     | Source key | The name of the data object field that represents the origin node of a flow link.                  | string   |
| `target`     | Target key | The name of the data object field that represents the destination node of a flow link.             | string   |
| `weight`     | Weight key | The name of the data object field that represents the numerical volume or quantity of a flow link. | string   |


---

# 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.heisenware.com/app-builder/build-frontend/widgets/display-widgets/sankey.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.
