@@ -258,9 +258,8 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
258
258
result [error_xy ] = {}
259
259
result [error_xy ][arr ] = g [v ]
260
260
elif k == "custom_data" :
261
- result ["customdata" ] = np .hstack (
262
- (result ["customdata" ], g [v ].values ))
263
- custom_data_len += len (v ) # number of custom data columns
261
+ result ["customdata" ] = np .hstack ((result ["customdata" ], g [v ].values ))
262
+ custom_data_len += len (v ) # number of custom data columns
264
263
elif k == "hover_name" :
265
264
if trace_spec .constructor not in [
266
265
go .Histogram ,
@@ -277,11 +276,13 @@ def make_trace_kwargs(args, trace_spec, g, mapping_labels, sizeref):
277
276
go .Histogram2dContour ,
278
277
]:
279
278
result ["customdata" ] = np .hstack (
280
- (result ["customdata" ], g [v ].values ))
279
+ (result ["customdata" ], g [v ].values )
280
+ )
281
281
for i , col in enumerate (v ):
282
282
v_label_col = get_decorated_label (args , col , None )
283
- mapping_labels [v_label_col ] = (
284
- "%%{customdata[%d]}" % (i + custom_data_len ))
283
+ mapping_labels [v_label_col ] = "%%{customdata[%d]}" % (
284
+ i + custom_data_len
285
+ )
285
286
elif k == "color" :
286
287
if trace_spec .constructor == go .Choropleth :
287
288
result ["z" ] = g [v ]
@@ -753,8 +754,9 @@ def apply_default_cascade(args):
753
754
def infer_config (args , constructor , trace_patch ):
754
755
# Declare all supported attributes, across all plot types
755
756
attrables = (
756
- ["x" , "y" , "z" , "a" , "b" , "c" , "r" , "theta" , "size" ]
757
- + ["dimensions" , "custom_data" , "hover_name" , "hover_data" , "text" , "error_x" , "error_x_minus" ]
757
+ ["x" , "y" , "z" , "a" , "b" , "c" , "r" , "theta" , "size" , "dimensions" ]
758
+ + ["custom_data" , "hover_name" , "hover_data" , "text" ]
759
+ + ["error_x" , "error_x_minus" ]
758
760
+ ["error_y" , "error_y_minus" , "error_z" , "error_z_minus" ]
759
761
+ ["lat" , "lon" , "locations" , "animation_group" ]
760
762
)
0 commit comments