mirror of
https://github.com/apache/superset.git
synced 2026-04-27 12:05:24 +00:00
fix: Timeseries Y-axis format with contribution mode (#27106)
This commit is contained in:
committed by
GitHub
parent
13f1642c73
commit
af577d64b1
@@ -95,6 +95,7 @@ import {
|
||||
} from '../constants';
|
||||
import { getDefaultTooltip } from '../utils/tooltip';
|
||||
import {
|
||||
getPercentFormatter,
|
||||
getTooltipTimeFormatter,
|
||||
getXAxisFormatter,
|
||||
getYAxisFormatter,
|
||||
@@ -253,7 +254,7 @@ export default function transformProps(
|
||||
const series: SeriesOption[] = [];
|
||||
|
||||
const forcePercentFormatter = Boolean(contributionMode || isAreaExpand);
|
||||
const percentFormatter = getNumberFormatter(',.0%');
|
||||
const percentFormatter = getPercentFormatter(yAxisFormat);
|
||||
const defaultFormatter = currencyFormat?.symbol
|
||||
? new CurrencyFormatter({ d3Format: yAxisFormat, currency: currencyFormat })
|
||||
: getNumberFormatter(yAxisFormat);
|
||||
@@ -486,6 +487,7 @@ export default function transformProps(
|
||||
forcePercentFormatter,
|
||||
customFormatters,
|
||||
defaultFormatter,
|
||||
yAxisFormat,
|
||||
),
|
||||
},
|
||||
scale: truncateYAxis,
|
||||
|
||||
Reference in New Issue
Block a user