Skip to content

Commit c007a86

Browse files
committed
Fix hover flicker on Runs by status chart
Moving the mouse across the stacked bar chart caused the bars to strobe between bright and dim. Each <Bar> had an onMouseLeave that reset the highlight state, so crossing from one series to the next fired leave (activeBarKey → null, all bars bright) before the next bar's enter (activeBarKey → new key, others dim). That null→key churn produced the flicker. Remove the per-Bar onMouseLeave. Moving between bars now only updates the active key via onMouseEnter, and the existing chart-level onMouseLeave (handleMouseLeave, which calls highlight.reset) still clears the highlight when the cursor leaves the whole chart. Legend hover is unaffected — it uses its own onMouseEnter/onMouseLeave handlers. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018wP95TbXaujzKBnDJbCD7u
1 parent 1a033b6 commit c007a86

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ export function ChartBarRenderer({
320320
highlight.setHoveredBar(hoveredKey, index);
321321
}
322322
}}
323-
onMouseLeave={highlight.reset}
323+
// No per-Bar onMouseLeave: moving between bars would fire leave→reset
324+
// (all bars snap bright) before the next bar's enter, causing a hover
325+
// flicker. The chart-level onMouseLeave (handleMouseLeave) clears the
326+
// highlight when the cursor exits the whole chart.
324327
isAnimationActive={false}
325328
/>
326329
);

0 commit comments

Comments
 (0)