diff --git a/apps/dashboard/src/MinificationBenchmarks.tsx b/apps/dashboard/src/MinificationBenchmarks.tsx index 90a1dcc..e03c937 100644 --- a/apps/dashboard/src/MinificationBenchmarks.tsx +++ b/apps/dashboard/src/MinificationBenchmarks.tsx @@ -115,7 +115,7 @@ function MinificationBenchmarks({}: MinificationBenchmarksProps) { `${value}ms`} + formatter={(label: React.ReactNode) => `${label}ms`} style={{ fontSize: '12px', fill: '#374151' }} /> @@ -160,7 +160,7 @@ function MinificationBenchmarks({}: MinificationBenchmarksProps) { `${value}%`} + formatter={(label: React.ReactNode) => `${label}%`} style={{ fontSize: '10px', fill: '#374151' }} /> diff --git a/apps/dashboard/src/RolldownStats.tsx b/apps/dashboard/src/RolldownStats.tsx index 1a9d0cf..ae2ce1e 100644 --- a/apps/dashboard/src/RolldownStats.tsx +++ b/apps/dashboard/src/RolldownStats.tsx @@ -169,7 +169,8 @@ function RolldownStats({ selectedMetric, setSelectedMetric }: RolldownStatsProps { + formatter={(label: React.ReactNode) => { + const value = typeof label === 'number' ? label : Number(label) || 0; if (value === 0) return 'baseline'; return value >= 0 ? `+${formatNumberWithCommas(value)}` : formatNumberWithCommas(value); }} @@ -219,7 +220,7 @@ function RolldownStats({ selectedMetric, setSelectedMetric }: RolldownStatsProps `${value}ms`} + formatter={(label: React.ReactNode) => `${label}ms`} style={{ fontSize: '11px', fill: '#374151' }} />