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, validateNonEmpty } 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: [
@@ -103,6 +107,11 @@ const config: ControlPanelConfig = {
default: 100,
},
},
formDataOverrides: formData => ({
...formData,
series: getStandardizedControls().shiftColumn(),
metric: getStandardizedControls().shiftMetric(),
}),
};
export default config;