[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:
nitin
2025-10-22 14:21:01 +05:30
committed by GitHub
parent c6addc2bb4
commit 226cc9eb74
37 changed files with 1096 additions and 407 deletions
@@ -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 ?? [],
@@ -63,7 +63,6 @@ export interface GroupByResolverArgs<Filter = ObjectRecordFilter> {
groupBy: ObjectRecordGroupBy;
viewId?: string;
orderBy?: OrderByWithGroupBy;
omitNullValues?: boolean;
}
export interface UpdateOneResolverArgs<
@@ -177,10 +177,7 @@ export const getResolverArgs = (
isNullable: true,
isArray: true,
},
omitNullValues: {
type: GraphQLBoolean,
isNullable: true,
},
viewId: {
type: UUIDScalarType,
isNullable: true,