Skip to content

Commit 08a318d

Browse files
chanliinochinxx
authored andcommitted
preserve legacy annotation for add_vline
1 parent 274d72e commit 08a318d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

plotly/basedatatypes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,6 +4218,22 @@ def _process_multiple_axis_spanning_shapes(
42184218
exclude_empty_subplots=exclude_empty_subplots,
42194219
**shape_to_add,
42204220
)
4221+
# Run legacy annotation logic
4222+
augmented_annotation = shapeannotation.axis_spanning_shape_annotation(
4223+
annotation,
4224+
shape_type,
4225+
shape_args,
4226+
legacy_ann, # now defined
4227+
)
4228+
4229+
if augmented_annotation is not None:
4230+
self.add_annotation(
4231+
augmented_annotation,
4232+
row=row,
4233+
col=col,
4234+
exclude_empty_subplots=exclude_empty_subplots,
4235+
yref=shape_kwargs.get("yref", "y"),
4236+
)
42214237
else:
42224238

42234239
# shapes are always added at the end of the tuple of shapes, so we see

0 commit comments

Comments
 (0)