richardfogaca commented on code in PR #36416:
URL: https://github.com/apache/superset/pull/36416#discussion_r2683054304


##########
superset-frontend/plugins/plugin-chart-table/src/transformProps.ts:
##########
@@ -276,10 +287,25 @@ const processColumns = memoizeOne(function processColumns(
         // percent metrics have a default format
         formatter = getNumberFormatter(numberFormat || PERCENT_3_POINT);
       } else if (isMetric || (isNumber && (numberFormat || currency))) {
-        formatter = currency?.symbol
+        // Resolve AUTO currency when currency column isn't in query results
+        let resolvedCurrency = currency;

Review Comment:
   Yes, this is backwards compatible. The new AUTO resolution logic only 
executes when currency?.symbol === 'AUTO'. For users with previously set static 
currencies (USD, EUR, etc.), the condition currency?.symbol === 'AUTO' 
evaluates to false, so the entire resolution block is skipped and the formatter 
is created exactly as before with their original currency. The only change in 
their code path is that we use resolvedCurrency (which equals currency 
unchanged) instead of currency directly



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