Skip to content

Commit 8b2d4bf

Browse files
committed
Fixed issued caused by a paper or domain, yref
1 parent 746b227 commit 8b2d4bf

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/python/plotly/plotly/basedatatypes.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,8 +1560,13 @@ def _add_annotation_like(
15601560
)
15611561
)
15621562

1563-
# If the new_object was created with an yref specified, the specified yref should be used otherwise assign the xref and yref from the layout_keys
1564-
if new_obj.yref == None or new_obj.yref == "y":
1563+
# If the new_object was created with a yref specified that did not include paper or domain, the specified yref should be used otherwise assign the xref and yref from the layout_keys
1564+
if (
1565+
new_obj.yref == None
1566+
or new_obj.yref == "y"
1567+
or "paper" in new_obj.yref
1568+
or "domain" in new_obj.yref
1569+
):
15651570
if len(refs) == 1 and secondary_y:
15661571
raise ValueError(
15671572
"""

0 commit comments

Comments
 (0)