From 8cd2a559113028f252e524556bd29c11e92bd185 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 22:45:21 +0000 Subject: [PATCH 1/5] fix: correct weightCol for percentage change aggregations in DataTable docs - Update example-project total-rows page to use prev_* columns as weightCol for percentage change columns (sales_change_pct0, num_orders_change_pct0, aov_change_pct0) - Add tip in DataTable documentation explaining that weightCol should be the baseline/previous value when aggregating percentage changes Co-Authored-By: Caleb Keller --- sites/docs/pages/components/data/data-table/index.md | 5 +++++ .../example-project/src/pages/tables/total-rows/+page.md | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sites/docs/pages/components/data/data-table/index.md b/sites/docs/pages/components/data/data-table/index.md index dc1f579fdc..89d7d4e31f 100644 --- a/sites/docs/pages/components/data/data-table/index.md +++ b/sites/docs/pages/components/data/data-table/index.md @@ -368,6 +368,11 @@ limit 5 ``` +:::tip Weighted Mean for Percentage Changes +When aggregating percentage changes (e.g., year-over-year growth rates), use `weightCol` to specify the **baseline/previous value** column, not the current value. This ensures the weighted average is calculated correctly, as percentage changes are relative to their original values. + +For example, if you have `sales_change_pct` calculated as `(current_sales - previous_sales) / previous_sales`, the `weightCol` should be `previous_sales`. +::: #### Custom Aggregations Values diff --git a/sites/example-project/src/pages/tables/total-rows/+page.md b/sites/example-project/src/pages/tables/total-rows/+page.md index e4bf7f4c9b..0ad2f4f4bc 100644 --- a/sites/example-project/src/pages/tables/total-rows/+page.md +++ b/sites/example-project/src/pages/tables/total-rows/+page.md @@ -206,9 +206,9 @@ If no `weightCol` is specified, the result will be identical to the result from - - - + + + @@ -317,4 +317,4 @@ SELECT 'Brazil', 'South America', 1609, 0.032, 0.1375, 0.1007, 0.091, -4.5, 80.2 - \ No newline at end of file + From c5f356de3a5d3a62849406584a91a64cce0c499f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 23:42:26 +0000 Subject: [PATCH 2/5] feat: add RadarChart component for spider/radar visualizations Co-Authored-By: Caleb Keller --- .../src/lib/unsorted/viz/index.js | 2 + .../src/lib/unsorted/viz/radar/Radar.svelte | 243 ++++++++++++++++++ .../lib/unsorted/viz/radar/RadarChart.svelte | 125 +++++++++ 3 files changed, 370 insertions(+) create mode 100644 packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte create mode 100644 packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte diff --git a/packages/ui/core-components/src/lib/unsorted/viz/index.js b/packages/ui/core-components/src/lib/unsorted/viz/index.js index 2759ded702..3d830ad605 100644 --- a/packages/ui/core-components/src/lib/unsorted/viz/index.js +++ b/packages/ui/core-components/src/lib/unsorted/viz/index.js @@ -24,6 +24,8 @@ export { default as Histogram } from './histogram/Histogram.svelte'; export { default as Hist } from './histogram/Hist.svelte'; export { default as LineChart } from './line/LineChart.svelte'; export { default as Line } from './line/Line.svelte'; +export { default as RadarChart } from './radar/RadarChart.svelte'; +export { default as Radar } from './radar/Radar.svelte'; export { default as BaseMap } from './map/BaseMap.svelte'; export { default as AreaMap } from './map/AreaMap.svelte'; export { default as PointMap } from './map/PointMap.svelte'; diff --git a/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte b/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte new file mode 100644 index 0000000000..8959c6b9f5 --- /dev/null +++ b/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte @@ -0,0 +1,243 @@ + + + diff --git a/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte b/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte new file mode 100644 index 0000000000..8b4c262e9d --- /dev/null +++ b/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte @@ -0,0 +1,125 @@ + + + + + + + + From 6af2a2864f40ec4c88039dd7917d684b78fd4e20 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 00:02:26 +0000 Subject: [PATCH 3/5] refactor: rewrite RadarChart to use direct ECharts config (like Sankey) - Rewrote RadarChart to follow the Sankey pattern with direct ECharts config - Renamed inner component to InnerRadarChart.svelte - Removed old Radar.svelte that used Chart wrapper (incompatible with radar coordinate system) - Fixed lint errors and formatting Co-Authored-By: Caleb Keller --- .../src/lib/unsorted/viz/index.js | 1 - .../unsorted/viz/radar/InnerRadarChart.svelte | 362 ++++++++++++++++++ .../src/lib/unsorted/viz/radar/Radar.svelte | 243 ------------ .../lib/unsorted/viz/radar/RadarChart.svelte | 135 ++----- 4 files changed, 387 insertions(+), 354 deletions(-) create mode 100644 packages/ui/core-components/src/lib/unsorted/viz/radar/InnerRadarChart.svelte delete mode 100644 packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte diff --git a/packages/ui/core-components/src/lib/unsorted/viz/index.js b/packages/ui/core-components/src/lib/unsorted/viz/index.js index 3d830ad605..6f03b9f992 100644 --- a/packages/ui/core-components/src/lib/unsorted/viz/index.js +++ b/packages/ui/core-components/src/lib/unsorted/viz/index.js @@ -25,7 +25,6 @@ export { default as Hist } from './histogram/Hist.svelte'; export { default as LineChart } from './line/LineChart.svelte'; export { default as Line } from './line/Line.svelte'; export { default as RadarChart } from './radar/RadarChart.svelte'; -export { default as Radar } from './radar/Radar.svelte'; export { default as BaseMap } from './map/BaseMap.svelte'; export { default as AreaMap } from './map/AreaMap.svelte'; export { default as PointMap } from './map/PointMap.svelte'; diff --git a/packages/ui/core-components/src/lib/unsorted/viz/radar/InnerRadarChart.svelte b/packages/ui/core-components/src/lib/unsorted/viz/radar/InnerRadarChart.svelte new file mode 100644 index 0000000000..0fcea6add0 --- /dev/null +++ b/packages/ui/core-components/src/lib/unsorted/viz/radar/InnerRadarChart.svelte @@ -0,0 +1,362 @@ + + + + +{#if error} + +{:else} + +{/if} diff --git a/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte b/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte deleted file mode 100644 index 8959c6b9f5..0000000000 --- a/packages/ui/core-components/src/lib/unsorted/viz/radar/Radar.svelte +++ /dev/null @@ -1,243 +0,0 @@ - - - diff --git a/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte b/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte index 8b4c262e9d..02c99ac4d1 100644 --- a/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte +++ b/packages/ui/core-components/src/lib/unsorted/viz/radar/RadarChart.svelte @@ -3,123 +3,38 @@ - - - - + + + + + + + + From b6fdac8a85349827d11c17d9dd8f5327c6985a55 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 00:16:33 +0000 Subject: [PATCH 4/5] docs: add comprehensive RadarChart examples to charts folder - Moved from chart-testing to charts folder (alongside other chart docs) - Added 15+ examples demonstrating all RadarChart features: - Basic single series radar - Multi-series comparison (Team A vs Team B) - Three-way product comparison - Circle shape vs polygon - Custom max value for consistent scaling - Fill opacity (high vs low) - Line width customization - Markers with custom size - Data labels showing values - Custom colors (fillColor, lineColor) - Color palette for multi-series - Combined styling options - Chart height customization - Each example includes clear description of what the prop does Co-Authored-By: Caleb Keller --- .../src/pages/charts/radar-chart/+page.md | 221 ++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 sites/example-project/src/pages/charts/radar-chart/+page.md diff --git a/sites/example-project/src/pages/charts/radar-chart/+page.md b/sites/example-project/src/pages/charts/radar-chart/+page.md new file mode 100644 index 0000000000..f39fabdef8 --- /dev/null +++ b/sites/example-project/src/pages/charts/radar-chart/+page.md @@ -0,0 +1,221 @@ +--- +title: Radar Chart +--- + +```sql skills_data +select 'JavaScript' as skill, 90 as proficiency +union all select 'Python' as skill, 85 as proficiency +union all select 'SQL' as skill, 95 as proficiency +union all select 'React' as skill, 80 as proficiency +union all select 'Node.js' as skill, 75 as proficiency +union all select 'TypeScript' as skill, 70 as proficiency +``` + +```sql team_comparison +select 'Speed' as metric, 85 as value, 'Team A' as team +union all select 'Quality' as metric, 90 as value, 'Team A' as team +union all select 'Communication' as metric, 75 as value, 'Team A' as team +union all select 'Innovation' as metric, 80 as value, 'Team A' as team +union all select 'Reliability' as metric, 95 as value, 'Team A' as team +union all select 'Speed' as metric, 70 as value, 'Team B' as team +union all select 'Quality' as metric, 85 as value, 'Team B' as team +union all select 'Communication' as metric, 90 as value, 'Team B' as team +union all select 'Innovation' as metric, 95 as value, 'Team B' as team +union all select 'Reliability' as metric, 80 as value, 'Team B' as team +``` + +```sql product_ratings +select 'Design' as category, 4.5 as rating, 'Product X' as product +union all select 'Performance' as category, 4.2 as rating, 'Product X' as product +union all select 'Price' as category, 3.8 as rating, 'Product X' as product +union all select 'Support' as category, 4.0 as rating, 'Product X' as product +union all select 'Features' as category, 4.7 as rating, 'Product X' as product +union all select 'Design' as category, 3.9 as rating, 'Product Y' as product +union all select 'Performance' as category, 4.8 as rating, 'Product Y' as product +union all select 'Price' as category, 4.5 as rating, 'Product Y' as product +union all select 'Support' as category, 3.5 as rating, 'Product Y' as product +union all select 'Features' as category, 4.0 as rating, 'Product Y' as product +union all select 'Design' as category, 4.2 as rating, 'Product Z' as product +union all select 'Performance' as category, 3.5 as rating, 'Product Z' as product +union all select 'Price' as category, 4.8 as rating, 'Product Z' as product +union all select 'Support' as category, 4.6 as rating, 'Product Z' as product +union all select 'Features' as category, 3.8 as rating, 'Product Z' as product +``` + +Radar charts (also known as spider charts or web charts) display multivariate data on a two-dimensional chart with three or more quantitative variables represented on axes starting from the same point. + +## Basic Radar Chart + +A simple radar chart showing a single data series. Each axis represents a different metric, and the values are plotted as points connected by lines. + + + +## Multi-Series Radar Chart + +Compare multiple entities across the same metrics. Each series is shown with a different color and appears in the legend. + + + +## Three-Way Comparison + +Radar charts are excellent for comparing three or more items across multiple dimensions. + + + +## Circle Shape + +By default, radar charts use a polygon shape. Set `shape="circle"` to use circular gridlines instead. + + + +## Custom Max Value + +By default, the max value for each axis is calculated as 1.1x the maximum data value. Use the `max` prop to set a fixed maximum for all axes - useful when you want consistent scaling (e.g., percentages out of 100). + + + +## Fill Opacity + +Control the transparency of the filled area with `fillOpacity`. Values range from 0 (transparent) to 1 (opaque). + +### High Opacity (0.7) + + + +### Low Opacity (0.1) + + + +## Line Width + +Adjust the thickness of the connecting lines with `lineWidth`. + + + +## Markers + +Show data point markers on the chart with `markers=true`. Customize the marker appearance with `markerShape` and `markerSize`. + + + +## Data Labels + +Display the actual values on the chart with `labels=true`. + + + +## Custom Colors + +Use `fillColor` and `lineColor` to customize the appearance of a single-series radar chart. + + + +## Color Palette for Multi-Series + +Use `colorPalette` to define custom colors for multi-series charts. + + + +## Combined Styling + +Combine multiple styling options for a polished look. + + + +## Chart Height + +Control the chart height with `chartAreaHeight`. + + From ba1b335eb6e5da3f9327db1440a61aef9346a87f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 02:32:00 +0000 Subject: [PATCH 5/5] chore: add changeset for RadarChart component Co-Authored-By: Caleb Keller --- .changeset/sour-pens-tan.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .changeset/sour-pens-tan.md diff --git a/.changeset/sour-pens-tan.md b/.changeset/sour-pens-tan.md new file mode 100644 index 0000000000..20c8f6ed6a --- /dev/null +++ b/.changeset/sour-pens-tan.md @@ -0,0 +1,11 @@ +--- +'@evidence-dev/core-components': minor +--- + +Add RadarChart component for spider/radar visualizations + +- New RadarChart component for displaying multivariate data on radar/spider charts +- Supports single series and multi-series comparisons +- Configurable shape (polygon or circle), fill opacity, line width, markers, and data labels +- Custom max value support for consistent axis scaling +- Custom color palette support for multi-series charts