Pie Chart Widget

You can use the Pie Chart widget to display a single result at a time.

See in Figure 125, “Pie Chart” an example of how this widget may look like.

Pie Chart

Figure 125. Pie Chart

Input Format

You can use the Pie Chart widget to visualize results of the groupBy() and top() functions. It can only show a single result at a time, meaning that if you provide several aggregate functions to the function argument of groupBy() it will only display the first aggregate result.

If you want to display multiple aggregate results in a single chart, you can use the Bar Chart widget, which supports showing multiple aggregate results.

Example: Log Level Distribution

Assume we have a service producing logs like the ones below.

ini files
2018-10-10T01:10:11.322Z [ERROR] Invalid User ID. errorID=2, userId=10
2018-10-10T01:10:12.172Z [WARN]  Low Disk Space.
2018-10-10T01:10:14.122Z [ERROR] Invalid User ID. errorID=2, userId=11
2018-10-10T01:10:15.312Z [ERROR] Connection Dropped. errorID=112 server=
2018-10-10T01:10:16.912Z [INFO]  User Login. userId=11

We would like to show a pie chart of the relative distribution of events with the respective log levels INFO, ERROR, and WARN.


If there is only one item in the pie chart, then the legend will not appear.

Widget Properties

Use the widget's Edit Style panel to configure the following properties.

  • Title

    The title of the widget as displayed in the dashboard. As in the example Figure 125, “Pie Chart”, it could be HTTP Methods.

  • Description

    The description of the chart. This is free form text supporting markdown syntax.

    For example, This chart shows all HTTP methods, except 'PUT' and 'HEAD'.

    This same description appears in the dashboard as a tooltip when hovering over the question mark on top of the widget.

  • Layout

    • Inner Radius

    Set the width of the inner circle of your pie. The width values are expressed in pixels.

    • Max Category Count

    Limit the number of slices in the pie chart. The smaller slices will be grouped into the category called Other.

  • Legends

    • Labels

      You have two options for displaying labels:

      • Truncate — shortens the length of the series for a better visualization within the chart. It is used in case of long labels that would exceed the maximum space allowed in the chart. It is the default option. Hover the mouse over a label, then press and hold ALT to momentarily see the full series.

      • Show full — shows the full name of the series, that is, the entire value is displayed in the label or tooltip. In case of very long labels, it might affect their visibility within the chart. Hover the mouse over a label, then press and hold ALT to momentarily see the truncated series.

    • Show Legend checkbox

      Allows to show or hide the legend in the pie. If ticked, it prompts the following properties.

      • Position

        Sets the position of the legend in the chart. Valid options are:

        • Right

        • Bottom

    • Visible Rows

      Text field to enter the desired number of visible rows in the legend to appear.

    • Show Title checkbox

      Allows to show or hide the legend's title.

      • Title

        Text field to enter the desired title for the legend.

  • Series

    Set the color of each series and assign each field the title you want to see displayed in the chart.