> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/ui-components/advanced-pie-chart.md).

# Advanced pie chart

The Advanced Pie Chart displays data in a circle divided into segments or slices, which are proportional to the represented values. It is possible to create more complex charts than with [Basic Pie Charts](https://docs.appfarm.io/library/ui-components/basic-pie-chart.md). For example, the Category Property is not limited to some data types and more visual properties are available.

## Usage

Advanced Pie Charts are used to show data as a percentage of a whole.

{% hint style="info" %}
Showroom: [Advanced Pie Chart example](https://showroom.appfarm.app/ui-components/advanced-pie-chart), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

## Properties

| Property                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Data source**         | Select a data source to display as a chart.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Filter**              | Apply a filter to the selected data source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Conditional filters** | Create conditional filters to apply to the selected data source.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| **Category property**   | Select the property that defines the slices of the chart.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Hide empty**          | <p>Visible when <strong>Category property</strong> is selected.</p><p>Enable to hide categories without content.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| **Tristate**            | <p>Visible when <strong>Show legend</strong> is enabled and the <strong>Category property</strong> is of data type Boolean.</p><p>By default, false and unset values are treated the same. Enable to treat unset values as a separate category.</p>                                                                                                                                                                                                                                                                                                    |
| **Data grouping**       | <p>Visible when <strong>Category property of data type Datetime</strong> is selected.</p><p>Add one or more groupings. Each grouping has a <strong>Group by</strong> dimension to group the data by, a <strong>Custom format</strong> to override the date format (check <a href="https://momentjs.com/docs/#/displaying/format/">momentjs</a> for a complete reference), and an <strong>Enabled</strong> setting. The first enabled grouping is used. If no grouping is enabled, all objects are displayed in the order given by the data source.</p> |
| **Value property**      | Select a data source to aggregate the data on. If no data source is selected, count will be used by default.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| **Aggregation**         | <p>Visible when <strong>Value property</strong> is selected.</p><p>Select one of the functions Count, Sum, Average, Median, Minimum or Maximum to aggregate the data on.</p>                                                                                                                                                                                                                                                                                                                                                                           |
| **Show uncategorized**  | <p>Visible when <strong>Show legend</strong> is enabled and the <strong>Category property</strong> is of data type Datetime, Enum, String or Reference (or Boolean with <strong>Tristate</strong>).</p><p>Enable to show uncategorized data as a separate category.</p>                                                                                                                                                                                                                                                                                |
| **Title**               | Enter a static title or bind it to a data source, function, date now or date today.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Subtitle**            | Enter a static title or bind it to a data source, function, date now or date today.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| **Show legend**         | Enable to show a legend.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Legend position**     | <p>Visible when <strong>Show legend</strong> is enabled.</p><p>Position the legend on the top, left, bottom or right side of the chart.</p>                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Disable animation**   | Enable to stop animation of the chart.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Disable gradient**    | Enable to lighten up the color value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Use enum colors**     | <p>Visible when the <strong>Category property</strong> is of type Enumerated Type.</p><p>Enable to use the colors defined in each Enum Value as slice colors.</p>                                                                                                                                                                                                                                                                                                                                                                                      |
| **Sort sections by**    | Define how the sections should be sorted, either by value or by category.                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| **Sort order**          | By default the values are sorted descending. It is also possible to sort ascending.                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |


---

# 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.appfarm.io/library/ui-components/advanced-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.
