Skip to content

Aggregation pie chart card

The Aggregation pie chart card asks the backend for the largest terms in a field and displays their counts as slices.

When to use it

Use it on aggregation dashboards or for large result sets where transferring every entity to the browser would be wasteful. Use Pie chart when grouping must be performed with a client-side JMESPath expression.

Live example

The Card Lab supplies deterministic aggregation buckets to the production card without contacting GraphQL.

Requirements

Requirement Value
Dashboard types Aggregation
Minimum size 3 columns by 5 rows
Data Backend aggregation buckets for one entity field
Backend capabilities Entity aggregation for the selected type and field
Permissions Read and aggregate access for the selected entity field

Configuration

The paths below are relative to cardConfig.data.

title

Property Value
Type string
Required No
Default No title
Values Plain text

Sets the chart heading.

entityType

Property Value
Type string
Required Yes
Default No default
Values device, interface, client, or group

Selects the aggregation service and dashboard search context.

localCardQueryFilter

Property Value
Type Neops search query string
Required No
Default *
Values A backend search expression

The backend combines it with the dashboard query using AND before aggregation.

aggrField

Property Value
Type string
Required Yes
Default No default
Values A backend-aggregatable field name

Selects the terms to count.

size

Property Value
Type Integer
Required Yes
Default No default
Values Positive bucket count supported by the backend

Limits the number of top buckets returned. The card reports overflow when the returned bucket count reaches this limit.

colorMapping

Property Value
Type Object mapping bucket labels to colors
Required No
Default Carbon chart colors
Values Standard color names or valid hex colors

Assigns stable colors to known bucket labels.

Examples

Top interface states

{
  "cardId": "aggregation-pie-chart",
  "data": {
    "title": "Interface states",
    "entityType": "interface",
    "aggrField": "state",
    "size": 10,
    "colorMapping": {
      "UP": "green",
      "DOWN": "red"
    }
  }
}

The backend returns up to ten state buckets and the card plots their counts.

Behavior

The card refetches when the dashboard query or filters change. Selecting a slice applies a query filter for that bucket to the shared entity context; selecting it again clears the filter.

Limitations and safety

Only fields supported by backend aggregation can be used. Values outside the top size buckets are not shown.

See Pie chart for client-side grouping and Bar chart for bar-based comparison.