Skip to content

Conversation

@BJohnBraddock
Copy link

@BJohnBraddock BJohnBraddock commented Dec 20, 2025

Goal: Fix runtime error when "animating" scattergl traces. I don't believe scattergl traces actually support animations like easing and redraw=False, but they should at least not hit a runtime error.

As shown in #6251 , there is an unsafe index into cdata with variable i because variable i comes from scene.count and not cdata.length. This is normally fine. However, during frame redraw animations, we may call scattergl.plot with a subset of calcdata, so cdata.length can be < scene.count.

Further up in traces/scattergl/plot.py there was already an instance of checking if cdata[i] is undefined, so I've mirrored that into the for loop.

Fixes #6251.
This should also fix #6897 which is the same error as #6251.

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.

ScatterGL throws TypeError: r[v] is undefined when using frames bug when animating Scattergl

1 participant