fix(big-number): use correct default font size for subtitle/subheader (#39493)

This commit is contained in:
Kamil Gabryjelski
2026-04-20 18:21:18 +02:00
committed by GitHub
parent 9fe3f634ec
commit bf7ec853fa
3 changed files with 30 additions and 12 deletions

View File

@@ -30,20 +30,11 @@ import {
import { styled, useTheme } from '@apache-superset/core/theme';
import Echart from '../components/Echart';
import { BigNumberVizProps } from './types';
import { PROPORTION } from './constants';
import { EventHandlers } from '../types';
const defaultNumberFormatter = getNumberFormatter();
const PROPORTION = {
// text size: proportion of the chart container sans trendline
METRIC_NAME: 0.125,
KICKER: 0.1,
HEADER: 0.3,
SUBHEADER: 0.125,
// trendline size: proportion of the whole chart container
TRENDLINE: 0.3,
};
function BigNumberVis({
className = '',
headerFormatter = defaultNumberFormatter,