Skip to content

Commit fdb5ffe

Browse files
committed
Update method of removing dot traces to fix issue in Solara.
1 parent 6b5408b commit fdb5ffe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

glue_plotly/viewers/histogram/dotplot_layer_artist.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,13 @@ def _update_visual_attrs_for_trace(self, trace):
116116
def _update_data(self):
117117
old_dots = self._get_dots()
118118
if old_dots:
119-
self.view._remove_traces(old_dots)
119+
with self.view.figure.batch_update():
120+
for trace in old_dots:
121+
self.view._remove_trace_index(trace)
120122

121123
dots = traces_for_layer(self.view, self.state, add_data_label=True)
124+
for trace in dots:
125+
trace.update(hoverinfo='all', unselected=dict(marker=dict(opacity=self.state.alpha)))
122126
self._dots_id = dots[0].meta if dots else None
123127
self.view.figure.add_traces(dots)
124128

0 commit comments

Comments
 (0)