WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Dec 9, 2025

After upgrading to Recharts 3, tooltips on pages with multiple charts (like the deployments page) were rendering behind the bars of other charts when the tooltip extended beyond its own chart row.

Root cause: Each chart row creates its own stacking context. When a tooltip from one chart extends into rows below, it appeared behind those rows' chart bars due to normal stacking order.

Fix: Add a high z-index class (z-20) to the ChartContainer when the tooltip is active, ensuring the hovered chart and its tooltip are in a higher stacking layer than surrounding rows. The relative positioning is added to ensure the z-index takes effect.

className={cn("relative", className, isTooltipActive && "z-20")}

Before - tooltip renders behind other chart bars

Note: There is a separate issue where tooltips can be clipped by table container boundaries (especially near the bottom of the table). This PR does not address that issue - it requires further investigation to identify the exact element causing the clipping.

Human Review Checklist

  • Verify the tooltip now appears above other chart bars on the deployments page
  • Check that z-20 is sufficient (may need adjustment if other elements have higher z-index)
  • Verify no layout issues from adding relative positioning to ChartContainer
  • Test tooltip behavior on dashboard cards that also use FlowRunActivityBarChart

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

Requested by: @desertaxle ([email protected])
Link to Devin run: https://app.devin.ai/sessions/187bbb9d6eb043c0a4fc9f48dd1fa562

After upgrading to Recharts 3, tooltips on pages with multiple charts
were showing data from the wrong chart. This was caused by externally
controlling the tooltip's 'active' prop while Recharts maintained
internal tooltip state, leading to stale payload data being displayed.

The fix removes the external control of the 'active' prop and instead
lets Recharts handle tooltip visibility naturally. The tooltip content
now checks the context to determine if it should render based on which
chart is the current holder, ensuring each tooltip displays its own
chart's data.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the ui-replatform Related to the React UI rewrite label Dec 9, 2025
The tooltip was rendering behind the bars of other charts because each
chart row creates its own stacking context. When the tooltip from one
chart extends into rows below, it appeared behind those rows' chart bars.

The fix adds a high z-index class (z-20) to the ChartContainer when the
tooltip is active, ensuring the hovered chart and its tooltip are in a
higher stacking layer than surrounding rows.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration devin-ai-integration bot changed the title fix(ui-v2): fix Recharts tooltip showing wrong data on multiple charts fix(ui-v2): fix Recharts tooltip rendering behind other charts Dec 9, 2025
devin-ai-integration bot and others added 2 commits December 9, 2025 19:50
The tooltip was being clipped by the table container's overflow-x-auto
which implicitly sets overflow-y to auto as well. This caused tooltips
near the bottom of the table to be cut off.

The fix adds a containerClassName prop to the Table component that allows
overriding the container's className. The DataTable component threads this
through as tableContainerClassName. The DeploymentsDataTable uses this to
add overflow-y-visible, allowing tooltips to extend beyond the table bounds.

Co-Authored-By: [email protected] <[email protected]>
@desertaxle desertaxle marked this pull request as ready for review December 9, 2025 20:21
@desertaxle desertaxle merged commit 70c7d5e into main Dec 9, 2025
10 checks passed
@desertaxle desertaxle deleted the devin/1765307523-fix-recharts-tooltip-multiple-charts branch December 9, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui-replatform Related to the React UI rewrite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants