Skip to content

Fix transitions completing early when another graph starts one - #8197

Open
bodison wants to merge 2 commits into
plotly:mainfrom
bodison:fix-transition-interrupt
Open

bodison wants to merge 2 commits into
plotly:mainfrom
bodison:fix-transition-interrupt

Conversation

@bodison

@bodison bodison commented Nov 25, 2026

Copy link
Copy Markdown

Fixes #8194

Bug

Scatter, quiver, sunburst, treemap and icicle create their parent transition with a bare d3.transition(), which d3 v3 puts on the document root. A newer transition there interrupts the older one, and the interrupt handler calls onComplete. So when a second graph starts a transition, the first graph's promise resolves and its plotly_transitioned event fires almost immediately. Sunburst, treemap and icicle also redraw at that point, which removes their leaving slices at once.

Fix

The parent transition is now created on the trace layer (scatterLayer.transition() / layer.transition()), so it can only be interrupted by a newer transition on the same layer.

Two new tests in transition_test.js fail on main: one for the scatter promise, one for the sunburst slices.

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.

[BUG]: A transition's promise resolves early when another graph starts a transition

1 participant