> For the complete documentation index, see [llms.txt](https://docs.kiloiot.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kiloiot.io/dashboards/adding-widgets/last-data-widget/pie.md).

# Pie Display

Render a sensor reading as a bold filled disc with the Pie display — high-contrast for wall displays.

The Pie display is a solid filled gauge — a circle that fills in as a wedge, complete at the maximum — with the value beside it. It works on the same scale principle as the Doughnut: the reading is shown as a proportion of a defined range. The difference is visual weight — a solid disc rather than a thin ring.

Choose Pie when you want a bolder mark on the dashboard, a tile that reads as a strong block of color.

<figure><img src="https://2057878315-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtNQh1wBSHSaknslMdOXm%2Fuploads%2Fgit-blob-1c9f98e4ff6029330bef38449bb8951b71e3f092%2Flast-data-pie.jpg?alt=media" alt="Last Data widget using the Pie display type"><figcaption></figcaption></figure>

## When to choose it

* The same range-based readings the Doughnut handles — fill, capacity, percentage — when a solid, high-contrast visual suits the board better.
* A tile that needs to stand out among lighter widgets.
* A wall display where a filled disc reads more clearly at distance than a ring outline.

Doughnut and Pie are interchangeable in function — pick whichever visual fits the dashboard, and let the look of the surrounding board guide the choice.

## Configure a Pie display

Here is a full setup for one real case — a bold capacity tile for a process-water reservoir on a supervisory dashboard. A level sensor reports the reservoir contents in liters, and the reservoir holds 8,000 liters — so the reading is 0 when empty and 8,000 when full. That 0–8,000 is the scale, and each condition is a slice of it. This is one example: a Pie suits any reading shown as a proportion of a range — only the device and the numbers change.

1. Open the dashboard in edit mode and click **Last data** in the widget picker. The settings panel opens on the **Datasource** tab, with no data sources yet.
2. Click **Add datasource**. A **Datasource 1** block appears.
3. In the block, click **Choose device** and select the reservoir's level sensor.
4. Click **Add metric**. A metric row appears.
5. In the row, set **Data type** to **Telemetry**, choose the volume reading under **Device metric**, and pick an **Icon**.

   > **This display needs a number.** The **Device metric** list offers every metric type, but a gauge fills against a scale — pick a numeric reading here; a non-numeric text value reads as 0. (To show text or an on/off value as-is, use the [Value display](/dashboards/adding-widgets/last-data-widget/number.md).) To change how a metric is stored, open **Devices → Metrics** — see [Metrics](/devices/metric-templates.md).
6. Click **Conditions: N** to open the Conditions modal. Set a **Default color** — the color the reading falls back to whenever none of your conditions match the current value — then for each band click **Add condition** and fill the row — enter a **Condition name**, set **Data type** to **Number** (the condition's own Data type, not the metric row's), because the reservoir holds 8,000 liters, enter **From** 0 (an empty reservoir) and **To** 8000 (a full one), and pick a **Color**. Then you can enter the color levels. For example:

   Working up from empty:

   * "Adequate" — **From** 5000, **To** 8000 — green
   * "Plan a refill" — **From** 2000, **To** 5000 — yellow
   * "Refill now" — **From** 0, **To** 2000 — red

   Click **Save** to close the modal.
7. Click **Next** to open the **Appearance** tab.
8. Enter a **Widget name** — for example "Process water" — and an optional **Description**.
9. Under **Widget type**, choose **Pie**. A **Value range** section appears for the metric.
10. Set **Min value** to **0** (an empty reservoir) and **Max value** to **8000** (its full 8,000-liter capacity) — the same range the conditions use. The wedge fills the whole circle at 8,000 liters.
11. Switch on **Display data legend** if useful, then click **Save**.

The result: a solid disc that reads as a strong block of color from across the room — full and green while the reservoir is well stocked, shrinking through yellow to red as it is drawn down. The same steps fit any capacity or proportion reading; change the device, the **Min value**/**Max value**, and the bands to match.

## Worked examples

**Daily throughput against a target** Set the day's target as the **Max value** and a counter that resets each shift as the metric. With **Min value** 0 (nothing produced yet) and **Max value** set to the day's target, the disc fills as the shift progresses — a half-filled disc by midday is on pace. Conditions can hold it red until a minimum output is reached and green once the target is in sight.

**Soil moisture across a planted area** A soil-moisture sensor reports a percentage, so the scale is naturally **Min value** 0 (bone dry) and **Max value** 100 (saturated), with conditions green From 40 To 80, yellow From 20 To 40, red From 0 To 20. The filled disc makes a dry zone obvious at a glance.

## See also

* [Last Data Widget](/dashboards/adding-widgets/last-data-widget.md) — Full setup reference and the other display types
* [Conditions](/dashboards/adding-widgets/conditions.md) — Numeric From/To color rules for each metric
* Other display types: [Value](/dashboards/adding-widgets/last-data-widget/number.md) · [Doughnut](/dashboards/adding-widgets/last-data-widget/doughnut.md) · [Gauge](/dashboards/adding-widgets/last-data-widget/gauge.md) · [Tube](/dashboards/adding-widgets/last-data-widget/tube.md) · [Radial gauge](/dashboards/adding-widgets/last-data-widget/radial-gauge.md)


---

# 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.kiloiot.io/dashboards/adding-widgets/last-data-widget/pie.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.
