Skip to content

Commit

Permalink
Fix presentation of string colorscales
Browse files Browse the repository at this point in the history
Fixes #1087.
  • Loading branch information
ivirshup committed Aug 2, 2018
1 parent 156bb2c commit 233f26d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _plotly_utils/basevalidators.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,9 +1274,11 @@ def validate_coerce(self, v):
return v

def present(self, v):
# Return tuple of tuples so that colorscale is immutable
# Return-type must be immutable
if v is None:
return None
elif isinstance(v, str):
return v
else:
return tuple([tuple(e) for e in v])

Expand Down

0 comments on commit 233f26d

Please sign in to comment.