abhinav-phi commented on code in PR #44815:
URL: https://github.com/apache/superset/pull/44815#discussion_r4143760083


##########
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.ts:
##########
@@ -1130,6 +1133,24 @@ class PivotData {
     return fmtAggs[groupName][String(groupValue)] || this.aggregator;
   }
 
+  /*
+   * Push a record into the grand-total slot, creating the slot on first use.
+   *
+   * The grand total has no key of its own, so -- exactly like rowTotals and
+   * colTotals -- its aggregator is built from the first record that reaches 
it,
+   * which lets it pick up that record's per-metric formatter. Building it in 
the
+   * constructor from `this.aggregator` instead (as this used to) pins it to
+   * `defaultFormatter`, so a metric configured with a currency or custom d3
+   * format had its total render as a bare number while its body cells rendered
+   * as money.
+   */
+  pushAllTotal(record: PivotRecord) {

Review Comment:
   Agreed, added `: void` to `pushAllTotal` so it matches `sortKeys()` and 
`processRecord()`.
   



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