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, }, }, ],