glue-viz / glue-plotly

Experimental plot.ly plugin for glue
BSD 3-Clause "New" or "Revised" License
2 stars 8 forks source link

Update how traces are removed from dotplot layer artist #61

Closed Carifio24 closed 5 months ago

Carifio24 commented 5 months ago

While using the dotplot layer artist in Solara (for the CosmicDS Hubble data story), I noticed that the way that we're currently removing traces causes an issue in that context when using zoom tools (as the traces need to be redrawn to resize the dots). In particular, something about the event sequencing was causing incorrect (and often out-of-bounds) trace indices to be used for the internal Plotly restyling calls. This PR modifies the trace-removal code to match that in the default histogram layer artist, which resolves this issue.