feat: apply standardized form data to tier 2 charts (#20530)

This commit is contained in:
Yongjie Zhao
2022-06-29 16:27:31 +08:00
committed by GitHub
parent 927d066f70
commit de524bc59f
11 changed files with 94 additions and 9 deletions

View File

@@ -17,7 +17,11 @@
* under the License.
*/
import { t } from '@superset-ui/core';
import { ControlPanelConfig, sections } from '@superset-ui/chart-controls';
import {
ControlPanelConfig,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
const config: ControlPanelConfig = {
controlPanelSections: [
@@ -67,6 +71,11 @@ const config: ControlPanelConfig = {
controlSetRows: [['color_scheme']],
},
],
formDataOverrides: formData => ({
...formData,
groupby: getStandardizedControls().popAllColumns(),
metric: getStandardizedControls().shiftMetric(),
}),
};
export default config;