LevisNgigi commented on code in PR #32767:
URL: https://github.com/apache/superset/pull/32767#discussion_r2006446913
##########
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:
I have tested and when you load a chart it now appears with the last value
prepopulated in the control and that is what the big number displays if that is
what you mean?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]