Ovilia commented on code in PR #20938:
URL: https://github.com/apache/echarts/pull/20938#discussion_r2142052578


##########
src/chart/radar/RadarSeries.ts:
##########
@@ -71,6 +72,10 @@ export interface RadarSeriesOption
 
     data?: (RadarSeriesDataItemOption | RadarSeriesDataValue)[]
 }
+export interface RadarCallbackDataParams extends CallbackDataParams {
+    indicatorIndex: number,
+    indicatorAxes: Array<IndicatorAxis>

Review Comment:
   We should not expose indicatorAxes. Try to expose attributes like 
`indicatorName` instead. You may not return the indicatorAxis array, instead, 
only return the indicator of interest. If users need to get the names of all 
indicators, they should save the variable of names of each indicators, just as 
in other cases of ECharts.



##########
src/chart/radar/RadarSeries.ts:
##########
@@ -102,6 +107,17 @@ class RadarSeriesModel extends 
SeriesModel<RadarSeriesOption> {
         });
     }
 
+    /**
+     * @overwrite
+     */
+    getDataParams(dataIndex: number, dataType: any, el?: Element): 
RadarCallbackDataParams {
+        const params = super.getDataParams(dataIndex) as 
RadarCallbackDataParams;
+        // indicatorIndex && indicatorAxes
+        params.indicatorIndex = (el && (el as any).__dimIdx) ?? null;

Review Comment:
   Avoid using `??`.



-- 
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]

Reply via email to