> 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="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-c40ea87134d19869584bc7641f15fb0247c025a2%2FScreenshot%202025-02-21%20at%2014.46.22.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.heisenware.com/app-builder/build-frontend/widgets/display-widgets/sankey.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
