Skip to content

Commit 08e221a

Browse files
committed
Stop the legend key colliding with the value
1 parent 8d61696 commit 08e221a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/webapp/app/components/primitives/charts/ChartLegendCompound.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export function ChartLegendCompound({
180180
)}
181181
>
182182
<span className="font-medium">{currentTotalLabel}</span>
183-
<span className="font-medium tabular-nums">
183+
<span className="shrink-0 font-medium tabular-nums">
184184
{currentTotal != null ? (
185185
valueFormatter ? (
186186
valueFormatter(currentTotal)
@@ -253,7 +253,7 @@ export function ChartLegendCompound({
253253
/>
254254
<span
255255
className={cn(
256-
"self-start tabular-nums",
256+
"shrink-0 self-start tabular-nums",
257257
isActive ? "text-text-bright" : "text-text-dimmed"
258258
)}
259259
>
@@ -350,7 +350,7 @@ function HoveredHiddenItemRow({ item, value, remainingCount, valueFormatter }: H
350350
<span className="text-text-bright">{item.label}</span>
351351
{remainingCount > 0 && <span className="text-text-dimmed">+{remainingCount} more</span>}
352352
</div>
353-
<span className="tabular-nums text-text-bright">
353+
<span className="shrink-0 tabular-nums text-text-bright">
354354
{value != null ? (
355355
valueFormatter ? (
356356
valueFormatter(value)

0 commit comments

Comments
 (0)