[Dashboards] - Min Max range on secondary axis bar charts (#15118)
video QA https://github.com/user-attachments/assets/70c37188-2398-43de-bbf6-5882bb79940a --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
-27
@@ -29,7 +29,6 @@ import {
|
||||
} from 'src/engine/api/common/types/common-query-args.type';
|
||||
import { isWorkspaceAuthContext } from 'src/engine/api/common/utils/is-workspace-auth-context.util';
|
||||
import { GraphqlQueryParser } from 'src/engine/api/graphql/graphql-query-runner/graphql-query-parsers/graphql-query.parser';
|
||||
import { computeIsNumericReturningAggregate } from 'src/engine/api/graphql/graphql-query-runner/group-by/resolvers/utils/compute-is-numeric-returning-aggregate.util';
|
||||
import { formatResultWithGroupByDimensionValues } from 'src/engine/api/graphql/graphql-query-runner/group-by/resolvers/utils/format-result-with-group-by-dimension-values.util';
|
||||
import { getGroupByExpression } from 'src/engine/api/graphql/graphql-query-runner/group-by/resolvers/utils/get-group-by-expression.util';
|
||||
import { isGroupByDateField } from 'src/engine/api/graphql/graphql-query-runner/group-by/resolvers/utils/is-group-by-date-field.util';
|
||||
@@ -169,32 +168,6 @@ export class CommonGroupByQueryRunnerService extends CommonBaseQueryRunnerServic
|
||||
}
|
||||
});
|
||||
|
||||
if (processedArgs.omitNullValues) {
|
||||
const aggregateFields = selectedFieldsResult.aggregate ?? {};
|
||||
|
||||
Object.values(aggregateFields).forEach((aggregationField) => {
|
||||
const aggregateExpression =
|
||||
ProcessAggregateHelper.getAggregateExpression(
|
||||
aggregationField,
|
||||
objectMetadataNameSingular,
|
||||
);
|
||||
|
||||
if (aggregateExpression) {
|
||||
queryBuilder.andHaving(`${aggregateExpression} IS NOT NULL`);
|
||||
|
||||
const isNumericReturningAggregate =
|
||||
computeIsNumericReturningAggregate(
|
||||
aggregationField.aggregateOperation,
|
||||
aggregationField.fromFieldType,
|
||||
);
|
||||
|
||||
if (isNumericReturningAggregate) {
|
||||
queryBuilder.andHaving(`${aggregateExpression} != 0`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
commonQueryParser.applyGroupByOrderToBuilder(
|
||||
queryBuilder,
|
||||
processedArgs.orderBy ?? [],
|
||||
|
||||
@@ -49,7 +49,6 @@ export interface GroupByQueryArgs {
|
||||
filter?: ObjectRecordFilter;
|
||||
orderBy?: OrderByWithGroupBy;
|
||||
groupBy: ObjectRecordGroupBy;
|
||||
omitNullValues?: boolean;
|
||||
viewId?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user