> 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/reference/widgets/display/pie-chart.md).

# Pie Chart

Pie or doughnut chart of categorical shares from data rows, with clickable slices

<figure><img src="https://3495989837-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE5Ketpww1s7TauSAJrJ8%2Fuploads%2Fgit-blob-fbaf9cb2310ab49d13220492ad37a5415f645988%2Fwidget-pie-chart.png?alt=media" alt="Doughnut chart of reject reasons on the early shift, with labels for fill level, label position, cap torque, foreign matter and other" width="608"><figcaption></figcaption></figure>

A pie chart shows how a whole splits into parts: which reject reasons dominate, which lines use the most energy, which products fill the week. Draw it as a pie or a doughnut, with labels, a legend and tooltips. It takes rows of data; you pick the field that names a slice and the field that sizes it.

**Good for:** reject and downtime reasons, shares of output or energy, product mix.

## Properties

The widget's General tab lists these properties under Receives and Emits. Drop an executor's output, input or trigger onto a row to link it. An example also fills an unlinked widget as demo data in the App Builder.

{% tabs %}
{% tab title="Receives" %}
**`data`** (from an output, `Array<object>`): The slices to plot. The argument and value fields are selected in the Data settings (auto-detected on first bind).

<details>

<summary>Example</summary>

```json
[
  {
    "material": "steel",
    "share": 52
  },
  {
    "material": "aluminium",
    "share": 31
  },
  {
    "material": "plastic",
    "share": 17
  }
]
```

</details>
{% endtab %}

{% tab title="Emits" %}
**`onPointClick`** (into an input, `object`): Writes the clicked point as `{ argument, seriesName, value }`.
{% endtab %}
{% endtabs %}

## Settings

Double-click the widget in the Page editor to open its settings, grouped in these tabs. Settings marked *set per screen* are pinned by nature: every screen keeps its own value.

<details>

<summary>General</summary>

* **Animate**: Eases the display to new data in one second; off draws every update at once, for fast live data.

</details>

<details>

<summary>Content</summary>

* **Argument field**: Field that names the slices.
* **Value field**: Field that sizes the slices.
* **Unit**: Text appended to every slice label after the value, e.g. %; empty appends nothing.
* **Display label infront of value**: Puts the slice name and a colon before the value in every slice label.

</details>

<details>

<summary>Look &#x26; feel</summary>

* **Title**: Title shown above the chart; empty shows none.
* **Chart type**: Full disc or a ring with a hollow center half the radius wide. Choices: Pie, Doughnut.
* **Show tooltips**: Shows a popup with name and value when hovering a slice.
* **Show labels**: Shows a value label on every slice; slices with value 0 get none. *Set per screen.*
* **Label position**: Placement of the slice labels: on the slice, aligned in columns beside the pie, or outside next to it. Choices: Inside, Columns, Outside. *Set per screen.*
* **Inner margin**: Empty space between the pie and the widget edge in px.
* **Palette**: Colors given to the slices in order; empty gives shades of the app accent color.

</details>

<details>

<summary>Legend</summary>

* **Visible**: Shows the legend. *Set per screen.*
* **Title**: Title shown above the legend items; empty shows none.
* **Vertical alignment**: Vertical placement of the legend block in the widget. Choices: Top, Bottom. *Set per screen.*
* **Horizontal alignment**: Horizontal placement of the legend block in the widget. Choices: Right, Center, Left. *Set per screen.*
* **Orientation**: Stacks legend items in a column or lays them in a row; empty picks a row when centered, else a column. Choices: Vertical, Horizontal. *Set per screen.*
* **Marker size**: Size of the color marker in every legend item in px. Range 10 to 40.

</details>


---

# 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/reference/widgets/display/pie-chart.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.
