OBSERVABILITY PLATFORM
Pie chart

Visualize proportional data with pie charts

Classic dashboards have their own panels and methods of configuring them. For details about panels in classic dashboards, see Classic dashboard panels.

Pie charts help you quickly view and compare a limited number of data segments by category. A pie chart panel visualizes data returned by a query as mutually exclusive, relatively proportional segments of a total amount. Each segment's size corresponds to the proportion of the result's whole.

To visualize large numbers of categories or categories that are not mutually exclusive, or when you need to compare exact numbers with precision, consider using categorical bar charts instead.

For details about the configuration options common to all panels, see Panels.

Add a pie chart to a dashboard

Use one of the following methods to add a pie chart to a dashboard. Pie charts accept metric and log queries only.

⚠️

Queries that return an extremely large number of data points or invalid results can result in panel errors. For example, a query might return an error for exceeding server resource limits.

Observability Platform reports these errors with an icon that appears in the corner of the Preview pane of the Add panel or Edit panel interfaces, or on the panel when viewing it on the dashboard. Hold the pointer over the icon to view the error message.

To add a pie chart panel to a standard dashboard:

  1. Add a panel to a dashboard.
  2. In the Add Panel interface, click the Type dropdown and select Pie Chart.
  3. Add a query to the panel.
  4. Click the Add button to add the panel to the dashboard and close the Add Panel interface.
  5. Optional: On the dashboard, click Save to save the new panel to the dashboard.

Use a pie chart's tooltip

When you hold the pointer over a segment in a pie chart, Observability Platform displays a tooltip that shows the segment's full label and value. If the segment is aggregated, the tooltip lists the top 10 series within the aggregation.

Configure a pie chart

You can configure a pie chart by modifying its Settings.

Any changes you make in the panel's Settings tab are immediately reflected in the Preview pane, but take effect only when you click Apply in the Edit panel interface and then save the dashboard.

⚠️

Observability Platform doesn't fully support directly editing a panel's JSON representation and recommends configuring panels in the user interface. Use the JSON representation only for managing your configuration as code with tools such as Chronoctl and Terraform.

To modify a pie chart's settings using its Settings tab:

  1. Edit the pie chart panel.
  2. In the Edit panel interface, click the Settings tab.

Modify a pie chart's legend

The Legend section in a pie series chart's Settings tab controls whether to display a legend alongside the chart, and if so it also configures where and how the legend is displayed.

  • Show: Toggles whether to display the legend. Defaults to disabled.
  • Position: Selects whether to display the legend at the Bottom or to the Right of the chart. Defaults to Bottom.
  • Mode: Selects whether to display the legend as a List of categories with a color swatch associating it with a line or bar on the chart, or as a Table with a header row. Defaults to List.
  • Size: Defines the legend's size relative to the chart as either Small or Medium. Defaults to Small.

Modify a pie chart's visual representation

The Visual section in a pie chart's Settings tab controls how Observability Platform visualizes the query's pie results in the chart.

  • Display: Toggles whether to visualize the data as a filled (Default) or Donut chart.
  • Show series name: Toggles whether the series name is displayed next to the segment.
  • Color Palette: Determines the chart's color palette. The Classic palette uses six colors and prioritizes readability, while the Consistent palette includes more colors and lets you assign a color to a series consistently across multiple panels. Defaults to Classic.

Modify a pie chart's other features

The Options section in a pie chart's Settings tab controls other features related to the chart's labels and units.

  • Label format: Determines whether a segment's value label should be depicted as a Percent, the raw Value, or Both at once.

    Percent and Value labels each have their own options, listed under the Percent and Value subsections.

    • For both Value and Percent labels, Decimals determines the maximum number of decimal places to render. The resulting decimal places might be fewer than the selected value because Observability Platform doesn't render trailing zeros in decimal places.

      For example, when Decimals is set to 2, the panel renders the value 1.5 as 1.5, the value 1.55 as 1.55, and 1.555 as 1.56.

      You can choose from 0 to 4 maximum decimal places, or Max, which displays up to 20 decimal places.

    • For Value labels, you can configure additional settings:

      • Abbreviate: Toggles whether to abbreviate units. For example, if you enable Abbreviate, Observability Platform renders a value of 100000000 as 100M. You can toggle this setting only if you set the Unit to Decimal or Bytes; Time units are always abbreviated and Percent values don't require it. Defaults to true.

      • Unit: Defines the value's unit. Defaults to Decimal.

      • Decimal: Displays values using base 10 units. For example, Observability Platform renders a decimal value of 1000000 as 1M when Abbreviate is enabled.

      • Bytes: Displays values using decimal multiple-byte units.

      • Time: Determines the unit of time that Observability Platform uses to interpret a numeric value. The unit you select isn't necessarily the unit Observability Platform displays.

        For example, if you select Nanoseconds, Observability Platform interprets a numeric value of 120 as 120 nanoseconds and renders it as 120ns. If you select Days, Observability Platform interprets the same value as 120 days and renders it as 4 months.

        The available Time units are Nanoseconds, Microseconds, Milliseconds, Seconds, Minutes, Hours, Days, Weeks, Months, and Years.

      • Percent: Interprets the value as a percentile, representing 0% to 100% on a range of either 0.0 to 1.0 (Percent (0.0-1.0)) or 0 and 100 (Percent (0-100)).

        For example, Observability Platform renders a value of 1.0 in Percent (0.0-1.0) as 100%, and in Percent (0-100) as 1%.

    • Aggregate when % is <=: Defines the percentile threshold at which the chart aggregates the smallest categories into a single segment. Categories with a percentile value smaller than this setting will be consolidated into a single segment on the chart. Defaults to 3.

Configure a pie chart as code

To configure an existing pie chart panel using Chronoctl:

  1. Use the chronoctl dashboard list --include-dashboard-json command to list dashboards with their JSON representations included.
  2. Modify the settings in the JSON representation.
  3. Apply the modified dashboard using chronoctl apply.