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>
This commit is contained in:
Yongjie Zhao
2021-10-06 10:43:51 +01:00
committed by Yongjie Zhao
parent b5dcf1ae81
commit de7b1f7f2d

View File

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