rusackas commented on code in PR #44657:
URL: https://github.com/apache/superset/pull/44657#discussion_r4134077626


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts:
##########
@@ -408,7 +428,7 @@ const cellValue =
       }
     },
     value() {
-      return this.val;
+      return this.mixedMetrics ? null : this.val;

Review Comment:
   Good catch. Moved the numerator's null check ahead of the denominator 
lookup, so a mixed slot always blanks regardless of what type the last-pushed 
metric's own total happens to be.



##########
superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx:
##########
@@ -1022,7 +1032,7 @@ test('TableRenderer keeps the grand-total corner cell 
self-consistent when it mi
     .getAllByRole('gridcell')
     .filter(cell => cell.classList.contains('pvtGrandTotal'));
   expect(grandTotalCells).toHaveLength(1);
-  expect(grandTotalCells[0]).toHaveTextContent('100.0%');
+  expect(grandTotalCells[0]).toHaveTextContent('');

Review Comment:
   Added a `.pvtTotal` assertion for the blue row in tableRenders.test.tsx and 
a matching `getAggregator(['blue'], [])` case in utilities.test.ts.



-- 
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]

Reply via email to