Open helgasoft opened 11 months ago
Hi @helgasoft . Thanks for your suggestion. Can you be more specific about the supposed new radar series option?
As about the radar tooltip indicator, I was once trying to fix the problem and yes it's difficult because radar's indicator is a different concept than an axis. Instead, one indicator is itself one axis rather than a category in an axis.
@Ovilia, thank you for replying. Hope other developers would also participate in the conversation. My view is strictly API and UI driven, did not analyze source code.
Radar chart is working, it's a simple chart with few customisations available. But the most important, tooltips, is flawed because of series-radar.data structure. When people try to customize tooltips (#19004), they find dataIndex unusable. See Demo Code for this and other oddities like:
I consider radar an axis, like parallelAxis. There are many similarities between them, one notable difference being the layout - radar is radial, parallelAxis is horizontal.
I also like polar's angleAxis for the ability to display simple line series with their points (parallelAxis doesn't do points).
Please note also that both polar and parallel charts have their own coordinateSystem.
So the goal would be to merge code from angleAxis and parallelAxis to get a new better radarAxis.
Once this is accomplished, we would start using series-line with coordinateSystem:'radar'
and radarIndex:0
, and series-radar will become obsolete.
Advantages:
That is my opinion, other's are readily welcome.
mark
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 :
Proposed API is having individual line series, as in polar. Radar is similar to polar but does not have its own coordinateSystem.
I think radar chart could be restructured like polar. With its specific radar axis and coordinateSystem. Radar axis may also borrow characteristics from parallelAxis, which is similar. Radar series could be redesigned to imitate series-parallel, or just be replaced by series-line. As a result of those convergences radar chart will become consistent with other series in ECharts.
Demo Code - polar imitating a radar chart