fix(plugin-chart-echarts): preserve null radar metric values as gaps (#30270)#41962
fix(plugin-chart-echarts): preserve null radar metric values as gaps (#30270)#41962rusackas wants to merge 7 commits into
Conversation
Code Review Agent Run #b076f3Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Radar transformProps normalized each series value with value / max in normalizeArray. A null (missing) metric coerced to 0 in that division, so a missing data point was plotted at the center of the radar as a real zero instead of being left out as a gap (#30270). Preserve null/non-finite values through normalization so ECharts renders them as gaps, and exclude nulls when computing the per-series max. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The suggestion to replace the single-case Would you like me to implement this change for you? I can also check the rest of the PR for similar instances if you would like me to proceed with a broader cleanup. superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #41962 +/- ##
=======================================
Coverage 64.78% 64.78%
=======================================
Files 2742 2742
Lines 153316 153330 +14
Branches 35143 35151 +8
=======================================
+ Hits 99323 99339 +16
+ Misses 52095 52093 -2
Partials 1898 1898
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #b01528Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
… not NaN The null-preservation fix for #30270 kept a missing metric out of the denormalization map, so label/tooltip lookups fell through to Number("null") and rendered "NaN" instead of a gap. Record an explicit null entry and skip formatting it in the label and tooltip renderers. Also convert the single-case describe() block to standalone tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review Agent Run #9ecb3f
Actionable Suggestions - 1
-
superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts - 1
- Missing i18n translation wrapper · Line 80-80
Review Details
-
Files reviewed - 5 · Commit Range:
8c959a3..53076ec- superset-frontend/plugins/plugin-chart-echarts/src/Radar/transformProps.ts
- superset-frontend/plugins/plugin-chart-echarts/src/Radar/types.ts
- superset-frontend/plugins/plugin-chart-echarts/src/Radar/utils.ts
- superset-frontend/plugins/plugin-chart-echarts/test/Radar/transformProps.test.ts
- superset-frontend/plugins/plugin-chart-echarts/test/Radar/utils.test.ts
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Eslint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.
Documentation & Help
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #94af26Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
…ation @superset-ui/core no longer exports t, so Radar/utils.ts failed to type-check and its test threw "t is not a function". Import t the same way the sibling Radar files (index.ts, controlPanel.tsx) already do. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code Review Agent Run #f943deActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
SUMMARY
Fixes #30270 — "Wrong visualization of missing values in radar charts".
A missing (
null) metric value was rendered as a real0pinned to the center of the radar instead of being left out as a gap. The root cause is in the RadartransformPropsnormalization:normalizeArraydivides each value by the per-seriesmax, andnull / maxcoerces thenullto0, so a gap silently became a genuine zero.The fix preserves
null/non-finite values through normalization (returningnullso ECharts renders a gap) instead of dividing them, and excludesnulls when computing the per-seriesmax. Valid numeric values are untouched.This ships with the regression test that reproduces the bug — red on
master, green with the fix.BEFORE/AFTER
nullmetric normalized to0and drew a point at the center of the radar as if it were a real zero.nullmetric staysnullthrough normalization and renders as a gap; real zeros still render at the center as before.TESTING INSTRUCTIONS
cd superset-frontend npx jest plugins/plugin-chart-echarts/test/Radar/transformProps.test.tsThe
missing (null) values › preserves a null metric instead of plotting it as 0case passes, along with all pre-existing RadartransformPropstests (10 total).ADDITIONAL INFORMATION
🤖 Generated with Claude Code