--- title: "Pie Chart in Preset" slug: "piechart" description: "Description and usage of the Pie chart in Preset Cloud." updated: 2023-03-10T18:57:28Z published: 2023-03-10T18:57:28Z canonical: "docs.preset.io/piechart" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.preset.io/llms.txt > Use this file to discover all available pages before exploring further. # Pie Chart The **pie chart** is a classic visualization that represents proportions of a whole using slices of a circle. Here are two examples of the same pie chart, one rendered as a classic pie and one rendered as a donut. ### ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/pies.png)Reference Content The following articles may be useful resources as you build your chart: - [Creating a Chart](/v1/docs/creating-a-chart): A walkthrough of the overall process of chart selection and creation. - [Using Preset Chart Builder](/v1/docs/using-preset-explore): How to work with the Chart Builder page, the primary interface used when creating a chart. ## Creating a Pie Chart **Pie Chart Using a Single Dimension** To create a Pie Chart, you need to define: - the Metric you want to visualize - the Dimension(s) you want the metric to be sliced by Here's a simple example: ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-09-20%20at%203.51.33%20PM.png) We set the **Dimension** to *rideable_type* and the **Metric** to *COUNT_DISTINCT(ride_id)***,** which resulted in the following SQL query: ```plsql SELECT rideable_type AS "rideable_type", count(DISTINCT ride_id) AS "COUNT_DISTINCT(ride_id)" FROM dbt_smukherjee.citibike_trips GROUP BY rideable_type ORDER BY "COUNT_DISTINCT(ride_id)" DESC ``` **Pie Chart Using Multiple Dimensions** You can also include multiple dimensions in your pie chart. The result will be a **m** by **n** combination of pie slices used in the grouping. Here's an example where we have two dimensions: ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-09-20%20at%204.08.38%20PM.png) Here's the query Preset generated: ```plsql SELECT rideable_type AS "rideable_type", member_casual AS "member_casual", count(DISTINCT ride_id) AS "COUNT_DISTINCT(ride_id)" FROM dbt_smukherjee.citibike_trips GROUP BY rideable_type, member_casual ORDER BY "COUNT_DISTINCT(ride_id)" DESC ``` ## Customizing your Pie Chart You can customize your pie chart with the options in the **Customize** tab. Here's an overview of some of the options: - **Legend** - **Show Legend**: shows legend if this checkbox is ticked - **Type**: specify if the legend should be scrollable or a default plain one - **Orientation**: location of the legend - **Margin**: extra padding to add around the legend (in pixels) - **Labels** - **Show Labels**: shows a label for each pie slice if this checkbox is ticked - **Puts Labels Outside**: places labels on the outside of the pie slices if this checkbox is ticked (otherwise inside the slices) - **Label Line**: adds connecting lines between the pie slice labels and the slices themselves if this checkbox is ticked![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-09-20%20at%204.28.44%20PM.png) - **Show Total**: shows total metric value count across all the groups - **Pie Shape**: - **Outer Radius**: slider for specifying the radius of the overall pie chart - **Donut**: switches pie chart to a donut pie chart if this checkbox is ticked![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-09-20%20at%204.28.35%20PM.png) - **Donut > Inner Radius**: slider for specifying the radius of the inner circle in a donut chart ![](https://cdn.document360.io/4749ddf8-aa05-4f3f-80e1-07a5d2d0f137/Images/Documentation/Screen%20Shot%202022-09-20%20at%204.29.07%20PM.png)