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
This commit is contained in:
@@ -320,7 +320,10 @@ export function ChartBarRenderer({
|
||||
highlight.setHoveredBar(hoveredKey, index);
|
||||
}
|
||||
}}
|
||||
onMouseLeave={highlight.reset}
|
||||
// No per-Bar onMouseLeave: moving between bars would fire leave→reset
|
||||
// (all bars snap bright) before the next bar's enter, causing a hover
|
||||
// flicker. The chart-level onMouseLeave (handleMouseLeave) clears the
|
||||
// highlight when the cursor exits the whole chart.
|
||||
isAnimationActive={false}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user