Skip to content

Commit 920817c

Browse files
author
Jon M. Mease
committed
Support deprecated Histogram2dcontour class in Data (traces) validator
1 parent ac59d45 commit 920817c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

_plotly_utils/basevalidators.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,10 @@ def class_map(self):
17971797

17981798
def validate_coerce(self, v):
17991799

1800+
# Import Histogram2dcontour, this is the deprecated name of the
1801+
# Histogram2dContour trace.
1802+
from plotly.graph_objs import Histogram2dcontour
1803+
18001804
if v is None:
18011805
v = []
18021806
elif isinstance(v, (list, tuple)):
@@ -1815,6 +1819,8 @@ def validate_coerce(self, v):
18151819

18161820
if 'type' in v_copy:
18171821
trace_type = v_copy.pop('type')
1822+
elif isinstance(v_el, Histogram2dcontour):
1823+
trace_type = 'histogram2dcontour'
18181824
else:
18191825
trace_type = 'scatter'
18201826

0 commit comments

Comments
 (0)