rusackas commented on code in PR #42533:
URL: https://github.com/apache/superset/pull/42533#discussion_r3693933509


##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:
##########
@@ -245,6 +246,11 @@ const config: ControlPanelConfig = {
       multi: false,
     },
   },
+  formDataOverrides: formData => ({
+    ...formData,
+    metric: getStandardizedControls().shiftMetric(),
+    groupby: getStandardizedControls().popAllColumns(),

Review Comment:
   @sadpandajoe good catch, fixed! Swapped popAllColumns() for shiftColumn() 
(wrapped in ensureIsArray so groupby keeps its array type) so only one column 
comes off the queue here, same as the single-value shiftMetric() already used 
for metric.



##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:
##########
@@ -245,6 +246,11 @@ const config: ControlPanelConfig = {
       multi: false,
     },
   },
+  formDataOverrides: formData => ({
+    ...formData,
+    metric: getStandardizedControls().shiftMetric(),

Review Comment:
   @sadpandajoe good catch on the scenario, but I think this gap lives in the 
standardizedControls framework itself, not Waterfall specifically. Pie, Gauge, 
Sunburst, and the rest all use the same shiftMetric()/queue pattern, so any of 
them would reproduce this if you hand-edit the metric instead of switching viz 
types again. Fixing it right means touching 
StandardizedFormData.getStandardizedControls(), not this control panel, so that 
feels like a follow-up issue rather than scope for this PR.



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