Skip to content

Commit 762911e

Browse files
committed
chore(pivot): Fix test expectations and don't aggregate when grouping the rows
1 parent 6a1cf99 commit 762911e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.pipes.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,16 @@ describe('Pivot pipes', () => {
5252
const rowPipeResult = rowPipe.transform(data, pivotConfigHierarchy.rows, pivotConfigHierarchy.values);
5353
const columnPipeResult = columnPipe.transform(rowPipeResult, pivotConfigHierarchy.columns, pivotConfigHierarchy.values);
5454
expect(columnPipeResult).toEqual([
55-
{ field1: 'All', All: 1000, Bulgaria: 774, USA: 829, Uruguay: 524, level: 0, records: [
55+
{ field1: 'All', All: 2127, Bulgaria: 774, USA: 829, Uruguay: 524, level: 0, records: [
5656
{ field1: 'Clothing', Bulgaria: 774, USA: 296, Uruguay: 456, level: 1 },
5757
{ field1: 'Bikes', Uruguay: 68, level: 1 },
5858
{ field1: 'Accessories', USA: 293, level: 1 },
5959
{ field1: 'Components', USA: 240, level: 1 }
6060
] },
61-
{ field1: 'Clothing', All: 1000, Bulgaria: 774, USA: 296, Uruguay: 456, level: 1 },
62-
{ field1: 'Bikes', All: 1000, Uruguay: 68, level: 1 },
63-
{ field1: 'Accessories', All: 1000, USA: 293, level: 1 },
64-
{ field1: 'Components', All: 1000, USA: 240, level: 1 }
61+
{ field1: 'Clothing', All: 1526, Bulgaria: 774, USA: 296, Uruguay: 456, level: 1 },
62+
{ field1: 'Bikes', All: 68, Uruguay: 68, level: 1 },
63+
{ field1: 'Accessories', All: 293, USA: 293, level: 1 },
64+
{ field1: 'Components', All: 240, USA: 240, level: 1 }
6565
]);
6666
});
6767

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-grid.pipes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class IgxPivotRowPipe implements PipeTransform {
2626
// build hierarchies - groups and subgroups
2727
const hierarchies = PivotUtil.getFieldsHierarchy(collection, rows, pivotKeys);
2828
// apply aggregations based on the created groups
29-
PivotUtil.applyAggregations(hierarchies, values, pivotKeys);
29+
// PivotUtil.applyAggregations(hierarchies, values, pivotKeys);
3030
// generate flat data from the hierarchies
3131
const data = PivotUtil.flattenHierarchy(hierarchies, collection[0] ?? [], rows, pivotKeys);
3232
return data;

0 commit comments

Comments
 (0)