feat: Dynamic currency (#36416)

This commit is contained in:
Richard Fogaca Nienkotter
2026-01-17 02:58:41 -03:00
committed by GitHub
parent 896947c787
commit f4474b2e3e
72 changed files with 3068 additions and 173 deletions

View File

@@ -201,8 +201,17 @@ export default function transformProps(
const xAxisLabel = getColumnLabel(xAxis);
// groupby is overridden to be a single value
const yAxisLabel = getColumnLabel(groupby as unknown as QueryFormColumn);
const { data, colnames, coltypes } = queriesData[0];
const { columnFormats = {}, currencyFormats = {} } = datasource;
const {
data,
colnames,
coltypes,
detected_currency: detectedCurrency,
} = queriesData[0];
const {
columnFormats = {},
currencyFormats = {},
currencyCodeColumn,
} = datasource;
const colorColumn = normalized ? 'rank' : metricLabel;
const colors = getSequentialSchemeRegistry().get(linearColorScheme)?.colors;
const getAxisFormatter =
@@ -225,6 +234,10 @@ export default function transformProps(
columnFormats,
yAxisFormat,
currencyFormat,
undefined,
data,
currencyCodeColumn,
detectedCurrency,
);
let [min, max] = (valueBounds || []).map(parseAxisBound);