Bar chart
Categorical SSR SVG for counts, comparisons, and grouped operational outcomes. Set Stacked for composition within each category.
- Purpose
- Compare named values across categories, including stacked operational outcomes.
- Primitive
- bar.Bar
- Kind
- components.KindBarChart
- Configuration
- Label, Caption, category Labels, named Series, Stacked, 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
@bar.Bar(bar.Config{
Label: "Deployments by environment",
Labels: []string{"Development", "Staging", "Production"},
Series: []bar.Series{
{Name: "Successful", Values: []float64{18, 12, 9}},
{Name: "Failed", Values: []float64{1, 2, 1}},
},
Stacked: true,
})Use case
Use bar charts for deployment outcomes, observation counts, or other categorical comparisons. Keep domain aggregation at the application view-model boundary.