zhaoyongjie commented on code in PR #20010:
URL: https://github.com/apache/superset/pull/20010#discussion_r873730892
##########
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:
> I'm wondering if we should consider adding `percent_metrics` to the
metrics array in `sharedFormData`? Let's say we have a table chart with just a
single metric in `percentage_metrics` and change to Pie - currently the metric
will be lost.
This is an interesting question. It is also a legacy of Superset's history.
The `Percentage Metrics` is a post-processing **metric** rather than a **SQL
base metric**. basically, it is not simply mapping from a source viz to a
target viz. The same control is `Contribution Mode` in the Line chart V2.
I have said before, to solve this issue, I think we eventually need to move
all post-processing(AA) into the metric and column so that we can do the real
map between different charts.
--
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]