Unify Applications
Logo
Pie & Donut Charts

Pie & Donut Charts

Logo

6 mins READ

The Pie chart type within the Chart block plots part-to-whole slices from one category field and one value field. A donut is achieved by adjusting the Slice Width setting — full produces a solid pie, while sm, md, or lg leave a hole in the center. A semi-donut is achieved by setting a custom Angle range (for example -90° to 90° for a top half-circle).

pie_and_donut_charts.png
pie_and_donut_charts.png

Tip: Pie: Slice Width = full. Donut: Slice Width = sm/md/lg. Semi-donut: Slice Width not full + an Angle range like -90° to 90°. All use Chart Type = Pie.

Content Properties

Property

Where to Set

Description

data (Data Source)

Content → Data Source

The array of records to plot.

Group by

Content → Group by

The field whose distinct values become slices. One slice per unique value.

Series

Content → Series

Exactly one series with a Label and Value field. Mapped series mode is not offered on Pie.

Tooltip

Content → Tooltip

Custom header and body text around the hover tooltip.

Slots → Center

Content → Slots

A nested block rendered in the hole of the donut. Use it for a total KPI, a label, or a custom icon.

Legends

Content → Add-ons → Legends

On by default. Legend Position: Top, Right (default), Bottom or Left. Distribute: Center (default) or Space Between. Columns: default 1. Remove the add-on to hide the legend.

Appearance Properties

Property

Options / Default

Description

Slice Width

sm, md (default), lg, full

Ring thickness preset. full = solid pie. Smaller values create a larger center hole.

Gap

pixels; default 2

Gap between slices in pixels. Not available when Slice Width is full.

Radius

pixels; default 5

Corner radius of each slice in pixels. Not available when Slice Width is full.

Angle

Start Angle / End Angle (in Degrees); default 0° to 360°

Controls the sweep of the chart. 0° is at the top (12 o'clock) and angles run clockwise. Use -90° to 90° for a top half and 90° to 270° for a bottom half.

Total

toggle

Shows the summed value in the center hole. Appears only when Slice Width is not full.

Chart Colours

color assignment

Color per slice/group value, or conditional rules.

styles

style set

Chart dimensions, padding, overflow, and responsive sizing.

Events & Methods

Event / MethodDescription
On Data Point ClickFires when user clicks a slice. Payload is the clicked record (all its fields). Use to filter other blocks or open detail views.

Pie Chart Variants

Solid Pie

Set Slice Width to full. No center hole. The simplest part-to-whole chart.

Donut Chart

Set Slice Width to sm, md, or lg. A center hole opens. Use the Center slot to place a KPI, label, or icon in the hole.

Example: Donut with Total KPI

  1. Set Chart Type = Pie, Slice Width = md.

  2. Enable Total in Appearance to show the summed value in the center.

  3. Or, add a custom block to the Center slot — bind a Text block to the total from your data source — for full styling control.

Semi-Donut (Gauge-Style)

Set Slice Width to any non-full value and configure the Angle:

  • Top half: Start -90°, End 90°

  • Bottom half: Start 90°, End 270°

  • Three-quarter (gap at the bottom): Start -135°, End 135°

Legend Configuration

Set up the legend in Content → Add-ons → Legends, which is on by default. Pie has its own legend options: four positions, a Distribute setting and a column count.

Position

Description

Top

Legend renders above the chart.

Right (default)

Legend renders to the right of the chart.

Bottom

Legend renders below the chart.

Left

Legend renders to the left of the chart.

The Distribute option controls legend alignment: Center (default) centers items, Space Between spreads them across the available width. Columns (default 1) arranges the legend items into that many columns. To hide the legend, remove the Legends add-on.

Slice Order & Labels

Warning: There is no automatic sorting and no "others" bucket. Slices render in the same order as the rows in your bound data. Shape your data (sort it, aggregate an "others" category) before binding it if order matters.

Data Labels on Pie

Pie has no per-slice data labels. To show each slice's value, use the Tooltip, which appears when users hover a slice. The legend names the slices, and Total shows the sum in the center of a donut.

Behavior & Gotchas

⚠ Mapped series mode is not offered on Pie

You can add only one series to a Pie chart, and only in Manual mode. The mapped-series mode that auto-generates series from data rows is not available here.

⚠ Center slot and Total can conflict

The built-in Total toggle and a custom Center slot both occupy the same center hole. If you add a Center slot block, use that for your total label and leave the Total toggle off.

Common Patterns

Budget Allocation Donut with KPI in Center

  1. Configure the chart: Set Chart Type = Pie, Group by = category field, Series → Value = amount field. Set Slice Width = md.

  2. Add a center KPI: Drop a Text block into the Center slot. Bind it to the total budget from your data source. Style with a large font variant.

  3. Configure the legend: Set Legend Position = Bottom and Distribute = Space Between to spread the categories across the bottom.

Progress Semi-Donut

  1. Set angle range: Set Angle Start = -90°, End = 90° to create a top semi-circle.

  2. Use two slices: Bind data with two rows: one for "completed" and one for "remaining". The completed slice fills the arc proportionally.

  3. Color the slices: Use Chart Colours with conditional rules: green for the completed slice, gray for remaining.

Page

Relationship

Circular Charts

Overview of the circular chart family, including Pie Slice Width, Angle, Total and the Center slot

Funnel Chart

Another part-to-whole visualization, showing stage-based drop-off

Bar & Column Charts

For comparing values across categories with a common axis

Data Labels & Annotations

Value labels for chart types that support them

FAQs

How do I create a donut chart instead of a solid pie?

Set Chart Type = Pie, then set Slice Width to any value except full: use sm for a thin ring, md for a medium ring, or lg for a wide ring. That's the only change — a donut is a pie with a center hole.

How do I show the total value in the center of a donut?

Enable the Total toggle in the Appearance settings. This automatically sums all slice values and renders the result in the center hole. For more control over the formatting or content of the center, use the Center slot instead: drop a Text block in the slot and bind it to a computed total from your data source.

My pie slices are in the wrong order. How do I fix it?

The Pie chart renders slices in the same order as the rows in the bound data source — there is no auto-sort option. To control slice order, sort your data query before binding it. For example, sort by value descending to put the largest slice first, or sort by a custom rank field.

Can I add text labels directly on the pie slices?

No. Pie has no per-slice data labels. To show each slice's value, use the Tooltip, which appears when users hover a slice, and rely on the Legend to name the slices. For a single summary in the center of a donut, turn on Total or place a block in the Center slot.