bito-code-review[bot] commented on code in PR #40967:
URL: https://github.com/apache/superset/pull/40967#discussion_r3401945896
##########
superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/controlPanel.test.ts:
##########
@@ -33,7 +45,7 @@ const getControl = (controlName: string) => {
'name' in control &&
control.name === controlName
) {
- return control;
+ return control as unknown as TestControl;
Review Comment:
<!-- Bito Reply -->
The update to the `getControl` function correctly implements the suggested
consolidation by casting the control to `TestControl`. This change ensures type
safety while maintaining compatibility with the shared test utility.
**superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/Scatter/controlPanel.test.ts**
```
control.name === controlName
) {
- return control;
+ return control as unknown as TestControl;
```
##########
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformers.ts:
##########
@@ -205,6 +205,7 @@ export function transformSeries(
seriesContexts?: { [key: string]: ForecastSeriesEnum[] };
markerEnabled?: boolean;
markerSize?: number;
+ symbolSizeFn?: (value: (number | string | null)[]) => number;
Review Comment:
<!-- Bito Reply -->
The addition of unit tests for `symbolSizeFn` in `transformSeries` is a
positive step that addresses the reviewer's concern regarding test coverage for
the new parameter. These tests ensure that the fallback logic (`symbolSizeFn ??
markerSize`) functions correctly and that the function receives the expected
data values, which is essential for maintaining the reliability of the scatter
chart's dot-size feature.
--
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]