@@ -192,8 +192,14 @@ def histogram(
192
192
color_selector = ColorSelectorFactory .create_instance ('unique' )
193
193
if data_type in ['period' , 'latency' ]:
194
194
data_list = [[_ * 10 ** (- 6 ) for _ in data ] for data in data_list ]
195
- max_value = max (max (data_list , key = lambda x : max (x )))
196
- min_value = min (min (data_list , key = lambda x : min (x )))
195
+ # max_value = max(max(data_list, key=lambda x: max(x)))
196
+ max_value = max (
197
+ max ([max_len for max_len in data_list if len (max_len )], key = lambda x : max (x ))
198
+ )
199
+ # min_value = min(min(data_list, key=lambda x: min(x)))
200
+ min_value = min (
201
+ min ([min_len for min_len in data_list if len (min_len )], key = lambda x : min (x ))
202
+ )
197
203
for hist_type , target_object in zip (data_list , target_objects ):
198
204
hist , bins = histogram (hist_type , 20 , (min_value , max_value ), density = True )
199
205
quad = plot .quad (top = hist , bottom = 0 ,
@@ -206,7 +212,7 @@ def histogram(
206
212
)
207
213
plot .add_tools (hover )
208
214
209
- legends = legend_manager .create_legends (20 , True , location = 'top_right' )
215
+ legends = legend_manager .create_legends (20 , False , location = 'top_right' )
210
216
for legend in legends :
211
217
plot .add_layout (legend , 'right' )
212
218
return plot
0 commit comments