Skip to content

feat(radar): add radar chart type#128

Merged
fahimfaisaal merged 14 commits into
mainfrom
worktree-feat+radar-chart
Jun 16, 2026
Merged

feat(radar): add radar chart type#128
fahimfaisaal merged 14 commits into
mainfrom
worktree-feat+radar-chart

Conversation

@fahimfaisaal

@fahimfaisaal fahimfaisaal commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Add radar chart as a new chart type — Go CLI layer, chunk pipeline, and gen.go
  • Core Vue component (ChartCard, ChartSettings, ChartRadar.vue) wired to new useRadarChartOptions composable
  • Multi-series design: renders largest polygon first so smaller ones stay hoverable; per-spoke max scaling; labeled tooltip values
    ode)

Creates ChartRadar.vue wrapper and useRadarChartOptions composable following
the pie-mirror layout (x-only, y-only, x+y, x+y+z side-by-side radars).
Adds 'radar' to ChartType union, DEFAULT_SETTINGS.charts, and composable index.
- makeIndicators now uses each spoke's own value * 1.1 as its max
  instead of the global max, preventing small-value spokes from
  becoming invisible
- Tooltip formatter now pairs each value with its indicator name
  (ind.name: value) using params.indicator, falling back to plain
  values when indicators are unavailable
…artSettings

- Add radar renderer to RENDERERS map and bypass 3D routing in ChartCard
- Import and instantiate useRadarChartOptions; add radar case to switch in useChartOptions
- Import Radar icon from lucide-vue-next; add radar entry to CHART_ICONS in ChartSettings
Register "radar" in validChartTypes, notAllowedForLimitedCharts (scale
and rotate not permitted), flag validation rules, --charts default and
description, template defaultCharts, and ParseChartSpecs error message.
Add three TestParseChartSpecs cases: sort=asc (valid), scale=log and
rotate (both invalid).
- Register ChartRadar in vite.config.ts CHART_ROOT_PREFIX so the Go pruner gates it as a first-class chart root
- Fix TS2322 in useRadarChartOptions.ts: apply ?? '#5470C6' fallback where getNextColorFor (string | undefined) is assigned to RadarDataItem.itemStyle.color (string)
- Rebuild UI; VizbChartRoots["radar"] = "vizb:ChartRadar-V1FgPFrh" now present in pkg/template/vizb-ui.gen.go
- Add radarRoot variable + require.NotEmpty assertion and "radar keeps radar" pruning sub-test in chunks_test.go
…attern

Replace pie-mirror implementation with a single radar chart where:
- Y-axis values become indicator spokes
- X-axis values become legend series (one polygon each)
- Z-axis (if present) becomes legend series with X values as multiple
  data points per Z series, matching the AQI city-per-series pattern
Legend items are now axis labels (X/Y/Z), selectedMode=single so only one
is active at a time. Clicking switches which axis values become the spokes,
rendering one polygon per view — matching how pie chart uses per-dimension
titles instead of per-value legend entries.
…rable

Large polygons drawn first (behind); small ones drawn last (on top).
Add symbol=circle/symbolSize=4 so each spoke vertex is independently
hoverable even when occluded by a larger polygon's fill area.
Legend order preserved separately via named matching.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fahimfaisaal
fahimfaisaal merged commit 77769da into main Jun 16, 2026
1 check passed
@fahimfaisaal
fahimfaisaal deleted the worktree-feat+radar-chart branch June 17, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants