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 3, 2018
1 parent 66b6782 commit 5aff631
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, string_types):
return v
else:
return tuple([tuple(e) for e in v])

Expand Down

0 comments on commit 5aff631

Please sign in to comment.