Skip to content

Pie chart

Categorical SSR SVG for compact part-to-whole summaries. Use it when the category count stays small and a total supports comparison.

Purpose
Summarize a small categorical status distribution as parts of a total.
Primitive
pie.Pie
Kind
components.KindPieChart
Configuration
Label, Caption, named Slices, optional Width, and Height.
Accessibility
Figure name comes from Label; Caption stays visible. Keep an adjacent table or text summary when exact values are needed.
Usage Example
@pie.Pie(pie.Config{
  Label: "Observation states",
  Slices: []pie.Slice{
    {Name: "Up", Value: 94},
    {Name: "Degraded", Value: 4},
    {Name: "Down", Value: 2},
  },
})

Use case

Use pie charts for bounded status breakdowns, not ordered time-series data. Aggregate domain data at the application view-model boundary.