EnxDev commented on code in PR #43718:
URL: https://github.com/apache/superset/pull/43718#discussion_r3903693797


##########
superset/charts/client_processing.py:
##########
@@ -98,6 +525,13 @@ def pivot_df(  # pylint: disable=too-many-locals, 
too-many-arguments, too-many-s
     # returning it
     if apply_metrics_on_rows:
         rows, columns = columns, rows
+        # The frame is transposed on the way out, which flips the axis each
+        # total was inserted on. Swap the toggles too, so `rowTotals` still
+        # means the right-hand Total column of the rendered table. The
+        # `columns and not rows` branch below transposes once more on its own,
+        # cancelling that flip, so it keeps the toggles as given.
+        if rows:

Review Comment:
   Could we cover `metricsLayout: ROWS` with no column grouping here? The 
renderer forces `rowTotals` on when `colAttrs` is empty, so enabling that 
toggle shouldn't add another axis. With `groupbyRows: ["nation"]`, 
`groupbyColumns: []`, and `rowTotals: true`, the export adds Subtotal/Total 
rows (4×1) while the chart stays 2×1 with its single Total column.



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