Node / Charts · guide
Radar chart
Current Apexify.js 6.0.0 documentation for Radar chart.
SOURCEtypescript
typescript
Requirements
options.radar.categories— ≥ 3 strings (throws otherwise).- Each
RadarSeries.valueslength must equalcategories.length.
RadarSeries
| Field | Purpose |
|---|---|
label | Legend text. |
values | Numeric polygon vertices (same order as categories). |
color | Fill tint (preset palette + golden-angle HSL fallback by index). |
stroke | Outline colour (distinct from color fill when set). |
gradient | Fill gradient. |
fillOpacity | Polygon fill alpha. |
lineWidth | Edge stroke width. |
opacity | Multiplier on fill/stroke/dots (**overrides chart-level radar.opacity). |
When color and stroke are both omitted, stroke/fill tint and legend swatches use the built‑in preset by series index (see below). Setting gradient still fills from that gradient when radar.fill is not false.
Built‑in colour preset (series index)
radarSeriesColor in radarchart.ts assigns colours in order:
- Fixed palette (indices 0…8):
#38bdf8,#a78bfa,#f472b6,#34d399,#fbbf24,#fb7185,#22d3ee,#f97316,#a3e635 - Golden‑angle HSL for index ≥ 9:
hue = (index × 137.508) % 360with stepped saturation/lightness
Use this when you want distinct series without hand‑picking hex values — legend entries pick up the same colours automatically.
RadarChartOptions.radar
| Field | Default / notes |
|---|---|
maxValue | Ceiling — defaults niceMax(maxData × 1.05). |
gridLevels | Concentric polygons (≥ 3, default 5). |
labelMarginRatio | Outer label padding (default ~0.12). |
fill | Fill under polygon (default true). |
showPoints, pointRadius | Vertex dots. |
gridColor, gridWidth | Web styling. |
axisLabelFontSize, axisLabelColor | Category captions. |
opacity | Global series multiplier (0…1). |
Example — skills matrix
SOURCEtypescript
typescript
Example — preset colours only (omit color / stroke)
Three polygons share no explicit colours; strokes and light fills follow the preset order above.
SOURCEtypescript
typescript
Example — outline‑first preset (fill: false)
Turn off polygon fill to emphasize spokes and shared grid; stroke still defaults through color or the preset.
SOURCEtypescript
typescript