apache / apache/echarts

[Feature] redesign radar chart like polar

Open
#19,182 4 comments 0 reactions 0 assignees View on GitHub
en new-feature pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### What problem does this feature solve?

The feature could solve several current radar problems like #16605, #15339, #10750, #10537, #20109, etc.
Current design is custom, unique and inconsistent with other charts. As a result, support and maintenance are more difficult.

### What does the proposed API look like?

Current **radar** series structure treats individual series as _data_ :
```
series: [{
type: 'radar',
data : [
{
value : [4300, 10000, 28000, 35000, 50000, 19000],
name : 'Allocated Budget'
},
{
value : [5000, 14000, 28000, 31000, 42000, 21000],
name : 'Actual Spending'
}
]
}]
```
Proposed API is having individual **line series**, as in [polar](https://echarts.apache.org/examples/en/editor.html?c=polar-roundCap). Radar is similar to polar but does not have its own _coordinateSystem_.
```
series: [
{ type: 'line', name: 'Allocated Budget', coordinateSystem: 'radar',
data : [ 4300, 10000, 28000, 35000, 50000, 19000]
},
{ type: 'line', name: 'Actual Spending', coordinateSystem: 'radar',
data : [5000, 14000, 28000, 31000, 42000, 21000]
}
]
```
I think radar chart could be restructured like polar. With its specific [radar axis](https://echarts.apache.org/en/option.html#radar) and **coordinateSystem**.
Radar axis may also borrow characteristics from [parallelAxis](https://echarts.apache.org/en/option.html#parallelAxis), which is similar.
[Radar series](https://echarts.apache.org/en/option.html#series-radar) could be redesigned to imitate [series-parallel](https://echarts.apache.org/en/option.html#series-parallel), or just be replaced by [series-line](https://echarts.apache.org/en/option.html#series-line).
As a result of those convergences radar chart will become consistent with other series in ECharts.

[Demo Code](https://echarts.apache.org/examples/en/editor.html?code=CYQwLiCMC8AEDaAmAzMgNJAHABg4xammaKyAugNwBQoEictUAdALYgAOAFJ8AJSzQAfLGABqSL2oB7dmACWUgHYDYAbyqxYAGwCmAcx2LgALjUBfNBtjspWkACdT8K5tWx7IYHICuAZ1MA5ACs2ACkAWiaAMaGYDqOCMFhEbBJ4WSwFi5q7p4-_qmYQeGRsDGKcQnwaSk1GVmaZJaaHl5-AIIAHnIFzpquIN2-ADJyijrGqr4AFlIA7sYAZiBavjoWsIM9wyAARjpakzPzSytrG1u-ACpyUQDWR7MLy6vrDf2ql6Pjjycv55EvnsDr9nmd1oChjd7qDTq8NjY7PYAJJGHSdYyQMxWJpWECKPS6Lo9JxWdT9ay2Byo4Do0y4bJgACe7AmqQAbitvDoItlfBB7GB2gTdPTItkgftDmpjmD4ZDtmM2VMnnCAZsobcHiq_uD3u9yf1EdS0RjYJBmv1mazApytNzeRT-Q4hSK2bhYBKhjspaZVFE_GApCwAGpcnQFRiIbGaGOwXGaIO2eTsP2M-xyPQGBIBS6O_qLKT2NhgSqmTjsdj8IQ5bKaKTeMDQAIBCjWdisDicKJRATCQ0U-uN2CiOABNYZiPGAKiHtMCdyCM09GiAKwO3c6ezqJMDc6USpETgEDLjEzueMU8jgIAHl29kEATrmV4z_sOjA3nsygbYGoFLjd4FynBBsgHfooikIsvEUcAdAAZSZfkdBYQJjXsfMKVglg2QCLQlRSBwdBAeDmVFNRIK0ItAnfYAUhkEAojkZljGwJhkHeClrVw_Dxkw_pGFMRhIGyTi1GfSDoLGODEOQ1DUnQlJ0NPTFLSwkAcMCXidEQFJnwAen0oiSLI5VKOo1JdntHlIgYpiWLYji1KtFkeII5zNEEo86FEnEqDMCggA) - polar imitating a radar chart

![image](https://github.com/apache/echarts/assets/13038071/fc16374e-1d69-464e-974b-beacdb6641d0)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.