LevisNgigi commented on code in PR #32767: URL: https://github.com/apache/superset/pull/32767#discussion_r2006390204
########## superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/customControls.tsx: ########## @@ -61,6 +61,28 @@ const xAxisSortVisibility = ({ controls }: { controls: ControlStateMapping }) => ensureIsArray(controls?.groupby?.value).length === 0 && ensureIsArray(controls?.metrics?.value).length === 1; +export const aggregationControl = { + name: 'aggregation', + config: { + type: 'SelectControl', + label: t('Aggregation Method'), + choices: [ + ['LAST_VALUE', t('Last Value')], + ['SUM', t('Total(Sum)')], + ['AVG', t('Average(Mean)')], + ['MIN', t('Minimum')], + ['MAX', t('Maximum')], + ['MEDIAN', t('Median')], + ], + description: t('Select an aggregation method to apply to the metric.'), + renderTrigger: true, + provideFormDataToProps: true, Review Comment: Hey,just added it here. value: form_data.aggregation || 'LAST_VALUE', -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org