tianrking opened a new pull request, #21741: URL: https://github.com/apache/echarts/pull/21741
## Brief Information This pull request is in the type of: - [x] bug fixing - [ ] new feature - [ ] others ### What does this PR do? This PR keeps missing radar dimensions absent from the rendered geometry instead of drawing them as real zero values at the radar center. ### Fixed issues - Closes #20811 and also addresses the same missing-data request in #20654. ## Details ### Before: What was the problem? Radar layout replaced `null`, `undefined`, `NaN`, and `'-'` values with the coordinate-system center before rendering. This made missing observations indistinguishable from actual numeric zeroes: they changed the polygon shape, produced symbols at the center, and could visually suggest measurements that were never present. The center fallback originally protected the generic polygon renderer from `NaN` coordinates, so simply removing it would reintroduce unstable path and animation behavior. ### After: How does it behave after the fixing? The layout now preserves one point per radar dimension and represents missing dimensions with invalid coordinates. Radar-specific polyline and polygon paths filter those coordinates only at the path-building boundary, retaining fixed-dimension shapes for animation while connecting neighboring valid dimensions without passing `NaN` values to the renderer. Symbols are created only for valid dimensions. A real numeric zero still renders at the center, all-missing data renders no series geometry, tooltip values remain unchanged, and complete numeric radar data follows the existing fast path. ## Document Info One of the following should be checked. - [x] This PR doesn't relate to document changes - [ ] The document should be updated later - [ ] The document changes have been made in apache/echarts-doc#xxx ## Misc ### Security Checking - [ ] This PR uses security-sensitive Web APIs. ### ZRender Changes - [ ] This PR depends on ZRender changes (ecomfe/zrender#xxx). ### Related test cases or examples to use the new APIs - `test/ut/spec/series/radar.test.ts` covers mixed missing values, real zeroes, path construction, symbols, tooltip data, all-missing input, updates that move the missing dimensions, and the unchanged complete-data path. - `test/radar-missing-value.html` provides side-by-side visual cases for partial and all-missing data. ### Merging options - [x] Please squash the commits into a single one when merging. ### Other information Validation performed on Node.js 20.20.2: - `npm test -- --runInBand` (27 suites, 198 tests) - `npm run lint` - `npm run checktype` - `npm run test:dts` (TypeScript 4.7 through 5.9) - `npm run release` - Chrome 151 browser verification of the visual case with both Canvas and SVG renderers, including path-command, symbol, and console-error assertions AI assistance (OpenAI Codex) was used for issue analysis, implementation, test authoring, and local verification. I reviewed and understand the complete change and the validation above. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
