Repository navigation
[Bug] null value for radar series #20811
Description
Activity
- addedpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.
on Mar 7, 2025 @skczjun It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] The null value of the radar chart is treated as 0
duplicate od #20654
Expected Behavior: null and undefined are directly treated as null values, and the connection is disconnected
Disconnecting lines in a radar chart would make it hard to read, I think. Maybe connecting to the next valid point would be more preferable, like so:

duplicate od #20654
Expected Behavior: null and undefined are directly treated as null values, and the connection is disconnected
Disconnecting lines in a radar chart would make it hard to read, I think. Maybe connecting to the next valid point would be more preferable, like so:

"How to achieve this effect"
I think "connecting to the next valid point" should be misleading, especially when symbol size is small. From the definition of Radar series, where each indicator shows the value of a dimension, I think it's reasonable to display 0 for dimensions not available. So I would say this is "not-a-bug".
Reacted by sz-p- added and removedpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.
on Mar 10, 2025 Consider using line series in polar system if you want to "connect to the next valid point" because if you have such requirement, your use case may probably not a "radar series".
Normally, a radar chart includes specific indicators. However, in certain cases, some indicators may not be available and thus have null values. These should not be simply treated as 0 because doing so would make it impossible to distinguish between actual zero values and missing data, which could represent anomalies. Given this issue, a new component library has been adopted to display the radar chart in order to better handle such scenarios where indicators might be missing or unavailable.
This approach ensures that missing data points are appropriately represented without conflating them with valid zero values, thereby providing clearer insights into the underlying data and making it easier to identify potential anomalies. By switching to a more capable component library, you can implement more sophisticated handling of missing data, improving the accuracy and interpretability of your radar charts.
If there is a need to display null values as 0, this can be achieved by modifying the data source or by providing a toggle in the component to allow users to decide whether null values should be shown as 0. This approach avoids a one-size-fits-all solution that automatically treats all null values as 0, giving users the flexibility to handle missing data according to their specific needs.
This method ensures that users can choose the most appropriate way to represent missing data, either displaying null values as 0 when it makes sense for their use case, or leaving them as null to clearly indicate the absence of data. By offering such an option, the component becomes more versatile and better suited to different data visualization requirements.The above demo seems reasonable. Thanks for suggestion. If you are interested, you are welcomed to make a pull request so that this problem can get fixed earlier. Thanks!
- changed the title
[-][Bug] 雷达图空值当成了0来处理[/-][+][Bug] null value for radar series[/+]on Mar 13, 2025 I'd like to work on this.
I plan to reproduce the current behavior on
master, trace the radar data/layout/rendering path so missing dimensions are preserved instead of becoming indistinguishable from real zero values, and add both logic-level and browser/visual regressions coveringnull/missing values, real zeroes, multiple series, symbols, areas, and tooltip data. I will keep the change compatible with existing radar data that contains only numeric values and run the repository's unit, type, lint, DTS, build, and relevant visual checks before opening a PR.AI assistance disclosure: I am using OpenAI Codex for code exploration and implementation assistance; I will review, understand, and test the complete change.


Version
5.2.2
Link to Minimal Reproduction
https://echarts.apache.org/examples/zh/editor.html?c=line-simple
Steps to Reproduce
option = {
radar: {
// shape: 'circle',
indicator: [
{ name: 'Sales', max: 400 },
{ name: 'Administration', max: 400 },
{ name: 'Information Technology', max: 400 },
{ name: 'Customer Support', max: 400 },
{ name: 'Development', max: 400 },
{ name: 'Marketing', max: 400 }
]
},
series: [
{
type: 'radar',
data: [
{value: [150, undefined , 224, null, 135, 50]}
]
}
]
};
Current Behavior
null,undefined当成了0来处理。
Expected Behavior
null,undefined直接按空值来处理,连线断开
Environment
Any additional comments?
No response