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

@@ -20,6 +20,7 @@ import { t } from '@superset-ui/core';
import {
ControlPanelConfig,
ControlPanelsContainerProps,
getStandardizedControls,
sections,
} from '@superset-ui/chart-controls';
@@ -96,6 +97,12 @@ const config: ControlPanelConfig = {
description: t('This defines the level of the hierarchy'),
},
},
formDataOverrides: formData => ({
...formData,
groupby: getStandardizedControls().popAllColumns(),
metric: getStandardizedControls().shiftMetric(),
secondary_metric: getStandardizedControls().shiftMetric(),
}),
};
export default config;