Skip to content

fix(dashboard): use opaque background and readable text color on cost chart tooltips - #11960

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
ZaimMarzuki:fix/tooltip-contrast
Aug 30, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
ZaimMarzuki:fix/tooltip-contrast

Conversation

@ZaimMarzuki

@ZaimMarzuki ZaimMarzuki commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The three Recharts tooltips in CostCharts.tsx (ProviderSpendCard, CostTrendCard, WeeklyPatternCard) used var(--surface) for background which resolves to a transparent value, and had no explicit text color property — making tooltip content unreadable in both light and dark mode. The text color defaults to the chart series color, so it blends into the tooltip background.

Most visible on the Weekly Usage Pattern card where the purple bar color (#8b5cf6) matched the default tooltip text.

Fix

Align the tooltip contentStyle with the pattern already used in ProviderCharts.tsx:

  • backgroundColor: var(--color-surface) (opaque)
  • borderColor: var(--color-border)
  • color: var(--color-text-main) (ensures readable text)
  • boxShadow: var(--shadow-soft)

Applied consistently to all three chart tooltips in the file.

Changed files

  • src/app/(dashboard)/dashboard/costs/components/CostCharts.tsx

… chart tooltips

The three Recharts tooltips in CostCharts.tsx (ProviderSpendCard,
CostTrendCard, WeeklyPatternCard) used var(--surface) for background
which can be transparent on dark themes and had no explicit text color,
making tooltip content unreadable when it blended with the chart bars.

Align the tooltip contentStyle with the pattern already used in
ProviderCharts.tsx: backgroundColor via var(--color-surface),
borderColor via var(--color-border), color via var(--color-text-main),
and boxShadow via var(--shadow-soft).
@diegosouzapw
diegosouzapw merged commit 8f38dcd into diegosouzapw:release/v3.8.51 Aug 30, 2026
14 of 15 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
… chart tooltips (diegosouzapw#11960)

Fix de contraste no tooltip do gráfico de custos (fundo opaco + cor de texto legível). Mudança isolada de CSS/classe, validada no worktree combinado. Obrigado!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants