# Pie and Donut charts

{% hint style="info" %}
Availability:

* Summary view - Total mode only.
* Focused view (when you select and focus on items in a dimension) - Period, Moving and Total mode only.
  {% endhint %}

A Pie chart displays the percentage share of a number of variables in the shape of a pie. Useful for visualizing the results for different branches within a company or sales to different customers. You do not need to display your data as a percentage in the grid first, as Phocas automatically calculates the percentages when you create the Pie chart. The size of each segment is proportionate to the percentage value.

A Donut chart is very similar to a Pie chart, however, just as the name implies, it displays the data in the shape of a donut rather than a pie.

<div align="left"><figure><img src="/files/BTMd9cFxc6xfoFDx7Ivh" alt="" width="134"><figcaption></figcaption></figure></div>

The following table describes what the Pie chart looks like in each view.

|              | **Summary view**                                                              | **Focused view**                                                    |
| ------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Contents** | There are segments for each time unit (month/day/year) in the current period. | There are segments for each of the focused items.                   |
| **Example**  | <img src="/files/CirpfZDINc9C6rJjek7H" alt="" data-size="original">           | <img src="/files/NynuFmce3oTWIdy32qP6" alt="" data-size="original"> |

<details>

<summary>Example: Use a Pie chart to visualize the profit share of each country</summary>

In the Sales database, create a Pie chart to visualize the profit share of each country this month.&#x20;

Prepare the data in the grid:

1. In Period mode, select the **Country** dimension.
2. Select **Measures** > **Profit**.
3. Select **Period** > **Current Month**.

Click the **Chart** button in the top right toolbar above the grid, then click the **Pie** chart category button on the left of the chart and select the **Pie** option.

The chart displays the profit share of each country this month.

<img src="/files/mqoDPEiCZpR08YMiXNoH" alt="" data-size="original">

</details>

<details>

<summary>Example 2: Create a Donut chart</summary>

1. Prepare the data in the grid.
2. Click the **Chart** button in the top right toolbar above the grid.
3. Click the **Pie** chart category button and select the **Donut** option.

<img src="/files/GNT4LJRJ5QFFVgdTdCHB" alt="" data-size="original">

</details>

***

{% hint style="success" %}
**Related pages**

You can take the following actions with your chart:&#x20;

[Configure the chart options](/analytics/visualize-your-data-in-a-chart/configure-the-chart-options.md) | [Select and focus on a chart segment](/analytics/visualize-your-data-in-a-chart/select-and-focus-on-a-chart-segment.md) | [Use the chart legend](/analytics/visualize-your-data-in-a-chart/use-the-chart-legend.md) | Save the chart as a favorite | Add the chart to a dashboard | [Export a chart as an image](/analytics/visualize-your-data-in-a-chart/export-a-chart-as-an-image.md)

See also the main page: [Visualize your data in a chart](/analytics/visualize-your-data-in-a-chart.md)
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.phocassoftware.com/analytics/visualize-your-data-in-a-chart/pie-and-donut-charts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
