zhaoyongjie commented on code in PR #20010:
URL: https://github.com/apache/superset/pull/20010#discussion_r873767947
##########
superset-frontend/plugins/plugin-chart-table/src/controlPanel.tsx:
##########
@@ -517,6 +517,11 @@ const config: ControlPanelConfig = {
],
},
],
+ denormalizeFormData: formData => ({
+ ...formData,
+ metrics: formData.standardized_form_data.sharedFormData.metrics,
Review Comment:
>This way the pie chart might not care if the metric was from metrics or
percent_metrics, but some other chart might decide to map the values over
differently, depending on where the value came from. This is especially true
for the x_axis control, which in a sense is a column/groupby, but should be
handled differently from the series control.
The `xaxis` didn't put in the `sharedControls`. it's a publicControls. In
the other words, the x-axis just "inhert" latest chart x-axis value, it can not
mapping from `sharedControls`.
I suggest that the modeling(like metric/dimension/filter/etc...) should
decouple from visualization. The `sourceControl: string;` means that preserve
the control context, this will allow modeling and visualization to be mixed.
--
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]