> 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/basic-pie-chart.md).

# Basic pie chart

The Basic Pie Chart displays data in a circle divided into segments or slices, which are proportional to the represented values.

## Usage

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

{% hint style="info" %}
Showroom: [Basic Pie Chart example](https://showroom.appfarm.app/ui-components/basic-pie), 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](https://docs.appfarm.io/reference/apps/data/data-sources.md) to display as a chart.                                                                                                                                                                                                            |
| **Filter**               | Apply a [filter](https://docs.appfarm.io/reference/platform-concepts/filters.md) to the selected data source.                                                                                                                                                                                                         |
| **Conditional Filters**  | Create conditional filters to apply to the selected data source.                                                                                                                                                                                                                                                      |
| **Category Property**    | Select a data source to display as slices in the chart. The data types Boolean, Enumerated Types, Datetime and Reference are supported.                                                                                                                                                                               |
| **Options**              | <p>Visible when the <strong>Category Property</strong> is a reference.</p><p>Select the data source that holds the referenced objects to use as slices.</p>                                                                                                                                                           |
| **Display Value**        | <p>Visible when the <strong>Category Property</strong> is a reference.</p><p>Select the property to show as the name of each slice.</p>                                                                                                                                                                               |
| **Use Enum Colors**      | <p>Visible when <strong>Category Property of type Enumerated Type</strong> is selected.</p><p><br>Enable to use the colors defined in each Enum Value.</p>                                                                                                                                                            |
| **Enable 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>                                                                   |
| **Group By**             | <p>Visible when <strong>Category Property of data type Datetime</strong> is selected.</p><p>Select a dimension to group the data by. By default, Month is selected.</p>                                                                                                                                               |
| **Custom Format**        | <p>Visible when <strong>Category Property of data type Datetime</strong> is selected and a <strong>Group By</strong> dimension is set.</p><p>Define a date format to override the format of the categories. Check <a href="https://momentjs.com/docs/#/displaying/format/">momentjs</a> for a complete reference.</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 Function** | <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. Default is Count.</p>                                                                                                                        |
| **Title**                | Enter a static title or bind it to a data source, function, date now or date today.                                                                                                                                                                                                                                   |
| **Title Position**       | <p>Visible when <strong>Title</strong> is selected.</p><p><br>Position the title on the top, left, bottom or right side of the chart.</p>                                                                                                                                                                             |
| **Show Legend**          | Enable to show a legend.                                                                                                                                                                                                                                                                                              |
| **Legend Position**      | <p>Visible when <strong>Show Legend</strong> is enabled.</p><p><br>Position the legend on the top, left, bottom or right side of the chart.</p>                                                                                                                                                                       |
| **Doughnut Cutout**      | Set the percentage of the circle cut out in the middle, from 0 to 90% in steps of 10. Default is 0 (a full pie).                                                                                                                                                                                                      |
| **Show empty**           | <p>Visible when <strong>Show legend</strong> is on and the <strong>Category property</strong> is a date, an enum, or a reference with <strong>Options</strong> set.<br></p><p>Enable to show categories that have no data in the legend.</p>                                                                          |
| **Show Uncategorized**   | <p>Visible when <strong>Show Legend</strong> is enabled.</p><p><br>Enable to display uncategorized data as a separate category in the legend.</p>                                                                                                                                                                     |


---

# 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/basic-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.
