Skip to main content

Piechart

The piechart panel displays data distribution as a pie chart with customizable colors and labels.

Properties​

PropertyTypeDescription
showLabelsboolWhether to display value labels on pie slices
colorsmapCustom color mapping by label name

Expected Columns​

ColumnTypeDescription
countnumberSize of each slice (required)
First non-count columnstringSlice label (e.g., health, status)

Colors​

The colors property maps label values to hex color codes. If not specified, colors are automatically assigned based on semantic meaning (e.g., "healthy" gets green, "error" gets red).

Example​

piechart.yaml
apiVersion: mission-control.flanksource.com/v1
kind: View
metadata:
name: piechart
namespace: mc
spec:
queries:
pods:
configs:
types:
- "Kubernetes::Pod"
panels:
- name: Health Status
description: Pods grouped by health
type: piechart
piechart:
showLabels: true
colors:
healthy: "#28C19B"
unhealthy: "#F04E6E"
warning: "#F4B23C"
unknown: "#666666"
query: SELECT COUNT(*) AS count, health FROM pods GROUP BY health