From de7b1f7f2dcbbfec4a31cdaba0b9126bcc199a33 Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Wed, 6 Oct 2021 10:43:51 +0100 Subject: [PATCH] chore: hide rolling_periods and min_periods (#1392) * chore: hide rolling_periods and min_periods * Update packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> * Update packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> --- .../src/sections/advancedAnalytics.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx index e7357122371..453a6c77d85 100644 --- a/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx +++ b/superset-frontend/temporary_superset_ui/superset-ui/packages/superset-ui-chart-controls/src/sections/advancedAnalytics.tsx @@ -57,6 +57,9 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = { 'Defines the size of the rolling window function, ' + 'relative to the time granularity selected', ), + visibility: ({ controls }) => + Boolean(controls?.rolling_type?.value) && + controls.rolling_type.value !== RollingType.Cumsum, }, }, ], @@ -74,6 +77,9 @@ export const advancedAnalyticsControls: ControlPanelSectionConfig = { 'shown are the total of 7 periods. This will hide the "ramp up" ' + 'taking place over the first 7 periods', ), + visibility: ({ controls }) => + Boolean(controls?.rolling_type?.value) && + controls.rolling_type.value !== RollingType.Cumsum, }, }, ],