[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:
-28
@@ -25,7 +25,6 @@ import { IGroupByConnection } from 'src/engine/api/graphql/workspace-query-runne
|
||||
import { type WorkspaceQueryRunnerOptions } from 'src/engine/api/graphql/workspace-query-runner/interfaces/query-runner-option.interface';
|
||||
import { GroupByResolverArgs } from 'src/engine/api/graphql/workspace-resolver-builder/interfaces/workspace-resolvers-builder.interface';
|
||||
|
||||
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';
|
||||
@@ -137,33 +136,6 @@ export class GraphqlQueryGroupByResolverService extends GraphqlQueryBaseResolver
|
||||
}
|
||||
});
|
||||
|
||||
if (executionArgs.args.omitNullValues) {
|
||||
const aggregateFields =
|
||||
executionArgs.graphqlQuerySelectedFieldsResult.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`);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
executionArgs.graphqlQueryParser.applyGroupByOrderToBuilder(
|
||||
queryBuilder,
|
||||
executionArgs.args.orderBy ?? [],
|
||||
|
||||
-1
@@ -63,7 +63,6 @@ export interface GroupByResolverArgs<Filter = ObjectRecordFilter> {
|
||||
groupBy: ObjectRecordGroupBy;
|
||||
viewId?: string;
|
||||
orderBy?: OrderByWithGroupBy;
|
||||
omitNullValues?: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateOneResolverArgs<
|
||||
|
||||
+1
-4
@@ -177,10 +177,7 @@ export const getResolverArgs = (
|
||||
isNullable: true,
|
||||
isArray: true,
|
||||
},
|
||||
omitNullValues: {
|
||||
type: GraphQLBoolean,
|
||||
isNullable: true,
|
||||
},
|
||||
|
||||
viewId: {
|
||||
type: UUIDScalarType,
|
||||
isNullable: true,
|
||||
|
||||
Reference in New Issue
Block a user