File tree 1 file changed +9
-6
lines changed
glue_plotly/viewers/histogram
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ def _calculate_histogram(self):
52
52
try :
53
53
self .state .reset_cache ()
54
54
self .bins , self .hist_unscaled = self .state .histogram
55
- except IncompatibleAttribute :
55
+ except ( IncompatibleAttribute , ValueError ) :
56
56
self .disable ('Could not compute histogram' )
57
57
self .bins = self .hist_unscaled = None
58
58
@@ -121,11 +121,14 @@ def _update_data(self):
121
121
for trace in old_dots :
122
122
self .view ._remove_trace_index (trace )
123
123
124
- dots = traces_for_layer (self .view , self .state , add_data_label = True )
125
- for trace in dots :
126
- trace .update (hoverinfo = 'all' , unselected = dict (marker = dict (opacity = self .state .alpha )))
127
- self ._dots_id = dots [0 ].meta if dots else None
128
- self .view .figure .add_traces (dots )
124
+ try :
125
+ dots = traces_for_layer (self .view , self .state , add_data_label = True )
126
+ for trace in dots :
127
+ trace .update (hoverinfo = 'all' , unselected = dict (marker = dict (opacity = self .state .alpha )))
128
+ self ._dots_id = dots [0 ].meta if dots else None
129
+ self .view .figure .add_traces (dots )
130
+ except (IncompatibleAttribute , ValueError ):
131
+ pass
129
132
130
133
def _update_zorder (self , * args ):
131
134
current_traces = self .view .figure .data
You can’t perform that action at this time.
0 commit comments