Skip to content
commit-766c8d6756a1

Radar chart

A small number of profiles across shared bounded dimensions.

Purpose
Compare a small number of profiles across the same bounded dimensions.
Use when
Use when shared dimensions and overall profile shape help readers spot broad strengths and gaps.
Avoid when
Avoid when precise values or more than a few profiles must be compared; aligned bars or a table are clearer.
Equivalent data
Keep indicator maxima and every series value in adjacent text or a table; shape and color alone are not equivalent data.
Exact values
SeriesSales (max 6500)Administration (max 16000)Information Technology (max 30000)Customer Support (max 38000)Development (max 52000)Marketing (max 25000)
Allocated Budget4200300020000350005000018000
Actual Spending50001400028000260004200021000
Usage Example
@radar.Radar(radar.Config{
  Label: "Basic radar chart",
  Indicators: []radar.Indicator{
    {Name: "Sales", Max: 6500},
    {Name: "Administration", Max: 16000},
    {Name: "Information Technology", Max: 30000},
    {Name: "Customer Support", Max: 38000},
    {Name: "Development", Max: 52000},
    {Name: "Marketing", Max: 25000},
  },
  Series: []radar.Series{
    {Name: "Allocated Budget", Values: []float64{4200, 3000, 20000, 35000, 50000, 18000}},
    {Name: "Actual Spending", Values: []float64{5000, 14000, 28000, 26000, 42000, 21000}},
  },
  Title: radar.TitleOptions{Text: "Basic Radar Chart", FontSize: 16},
  Legend: radar.LegendOptions{Horizontal: radar.PlacementEnd},
  Width: 600, Height: 400,
})

Readable values and compact layout

The same profiles demonstrate typed dimension minimums, indicator labels, compact vertex formatting on one profile, logical title and legend placement, padding, and caller colors without changing the values.

Exact values
SeriesSales (min 1000, max 6500)Administration (max 16000)Information Technology (max 30000)Customer Support (max 38000)Development (max 52000)Marketing (max 25000)
Allocated Budget4200300020000350005000018000
Actual Spending50001400028000260004200021000
Readable values and compact layout
cfg := sampleBasicRadar()
cfg.Label = "Readable radar values and compact layout"
cfg.Caption = "The same budget comparison uses typed labels, compact formatting, logical placement, and caller colors."
cfg.Indicators[0].Min = 1000
for index := range cfg.Indicators {
  cfg.Indicators[index].Label.FontSize = 10
}
cfg.Options = radar.Options{
  RadiusPercent: 44,
  ValueLabels: radar.ValueLabelsShown,
  ValueFormat: radar.ValueFormatHumanized,
}
cfg.Series[0].Options.LabelFontSize = 9
cfg.Series[1].Options = radar.SeriesOptions{
  ValueLabels: radar.ValueLabelsHidden,
  ValueFormat: radar.ValueFormatInteger,
}
cfg.Title = radar.TitleOptions{
  Text: "Basic Radar Chart", Subtext: "Values at each vertex",
  Horizontal: radar.PlacementCenter, FontSize: 16, SubtextFontSize: 12,
}
cfg.Legend = radar.LegendOptions{
  Orientation: radar.LegendVertical, Horizontal: radar.PlacementEnd,
  Alignment: radar.AlignmentEnd, FontSize: 10, Overlay: true,
}
cfg.Padding = radar.Padding{Top: 24, Right: 84, Bottom: 24, Left: 24}
cfg.Style = charttheme.Style{
  Palette: charttheme.PaletteAraiHu,
  Colors: []string{"#365314", "#c2410c"},
  Class: "radar-explicit-override",
}
cfg.Export = &chartcontrol.ExportOptions{
  Filename: "readable-radar-values",
  Background: chartcontrol.ExportBackgroundTransparent,
}
@radar.Radar(cfg)

Static/vector behavior

Radar renders inline SVG on the server, follows Goshtoso and AraiHu tokens in light and dark mode, stays readable in print and in no-JavaScript delivery, and provides resolved SVG plus opaque or transparent PNG download through the shared wrapper. Read shared chart controls and chart modes guides for lifecycle, export, client events, and the capability differences between static/vector and interactive charts.

Go API

v0.0.1

The examples above cover behavior and composition. pkg.go.dev is the canonical reference for exported types, functions, methods, and Go documentation.

github.com/araihu/goshtoso-charts/components/radar

Enabled, disabled, hidden, and omitted wrapper behavior, controls, export, and client transitions are shared by every chart. Review chart controls, then compare static/vector and interactive capabilities.

Open v0.0.1 API