# Pie Chart

### Pie Chart

A Pie Chart is a special chart that uses pie slices to show relative sizes of data. It shows how a total amount is divided between levels of a categorical variable as a circle divided into radial slices.

**How to Create a Pie Chart:**

* First, you need to go to Visualization Section in Reports and select the Pie Chart option.
* Now in the Build panel go to the Values part inside Chart Setting section and Choose or Drop the relevant Measure columns with desired aggregation functions such as Sum of Sales, Count of Orders, etc wrt which you want to plot the Pie Chart.
* Now in the Labels section, you need to select the relevant Dimension Column(preferably a Categorical column) using which you want to divide the selected Data into different slices in the Pie Chart.
* Then Click on the Run Button and your Pie Chart will be ready.

For eg: You want to create a **Sales per Product Category** report using a **Pie Chart**. It can be done easily using Report's  Pie Chart option. You will first need to select the Measure column "Sales" in the **Value** part of **Chart Settings** and select the "Product Category" column in the **Labels** part of the same. Then you will need to click on the **Run** button and your desired **Pie Chart** report will be ready.

In Report Pie Chart has two panels **Build** and **Format.**

### Build

his panel is like a building block for the Pie Chart. It allows you to select various Dimension and Measure columns for creating the Pie Chart.

It is further divided into 3 parts:

**Chart Settings**: This allows you to select the relevant Dimension and Measure Columns.

* **Values**: Here you can select 1 Measure Column using which you need to plot the Pie Chart.&#x20;
* **Labels:** Here you can select 1 Dimension Column using which you need to create the different slices in the Pie Chart.

**Row Limit:** This allows you to limit the Output rows by going to the Row Limit section in the Build panel then selecting the number of rows and clicking on the Run Button.&#x20;

**Sort:** This allows you to Sort the report based on certain columns. Go to the Sort option at the bottom in the Build panel then choose one or more columns along with the order Ascending or Descending and then click on the Run button.

### Format

This panel allows you to apply various formatting techniques on the Pie Chart to make it more customized as per your need.

It consists of various different sections which are as follows:

#### **Title**&#x20;

This allows you to give a Title to the Line Chart. You just need to go to the Title section in the Format panel.

You can easily toggle it on or off.  In the "Customize title" modal, you can:

* Modify the title text, font size, and alignment, and even add a background color.&#x20;
* Include an optional description that will appear when hovering over the "i" icon that will be visible as a floating button on the tile.

Once done, click the **Apply** button.

**Option:** This allows you to decide and control the geometric aspects of the Pie Chart like its radius, border width, etc. It has 4 components:

* Radius: It allows you to set the radius for the inner circle of the Pie Chart. It helps in creating a Donut Chart by increasing the inner Radius value.
* Border Width: It allows you to set the width of each slice's border in the Pie Chart.
* Border Radius: It allows you to set the border radius for each slice in the Pie Chart.
* Rose:

### **Labels**&#x20;

It allows you to enable/disable the visibility, the appearance & the layout of data labels. By default, it will be disabled. You can turn on the labels using the toggle switch.

{% tabs %}
{% tab title="Global settings" %}
### Global Label Settings

Apply consistent formatting to all labels within a chart.&#x20;

You can customize:

* **Layout**: Position, alignment, overflow, and rotation etc.
* **Content**: Display values, series names, or categories.
* **Appearance**: Font, color, background, and number formatting etc.
{% endtab %}

{% tab title="Specific Settings" %}
### Specific Label Settings

Tailor labels for individual data points or categories.&#x20;

Ideal for highlighting specific data or creating visual distinctions.

To add specific formatting:

* Add the specific label from the dropdown
* Click on the fields to make them editable and change the values according to your requirements.
* Apply the changes. These changes will override the global settings.

Example: Display percentages as labels for one series, while showing values for another.
{% endtab %}
{% endtabs %}

#### **Legend**

* This allows you to showcase the chart legend.
* By default it is disabled. But you can easily enable it by clicking on the Show Legend toggle button under the legends section under the format panel.
* Choose from a variety of positions, including top, bottom, left, and right, with options for stacking and centering.&#x20;
* For charts with many legends, you can now paginate them or arrange them in multiple rows.&#x20;
* Additionally, you can customize the font size, color, family, and style of legend text to match your chart's design.

**Grid Offset:** It allows you to adjust the chart grid as per your need. It has 4 offset types: Right, Left, Top, and Bottom.&#x20;

**Filed Formatting:** This allows you to format field values in the selected dimension and measure columns as per your requirement. It involves changing the field values like the field value's display units, number of decimal places, adding any prefix or suffix, etc.
