feat(radar): add radar chart type#128
Merged
Merged
Conversation
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
…and-aid fallbacks
…rious index from radar config
…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.
…e pattern" This reverts commit b73e597.
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gen.goChartCard,ChartSettings,ChartRadar.vue) wired to newuseRadarChartOptionscomposableode)