Skip to content

Commit

Permalink
Fix default_legend
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus89 committed Jan 11, 2020
1 parent 7a29c72 commit b4b07a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cartoframes/viz/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ def _infer_prop(self, _type):
if _type.startswith('color'):
return 'color'
elif _type.startswith('size'):
return 'width'
return 'size'
else:
return None
1 change: 1 addition & 0 deletions cartoframes/viz/legend_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def _init_legends(self, legends, default_legend):
if isinstance(legend, Legend):
if legend._type == 'default' and default_legend:
legend._type = default_legend._type
legend._prop = default_legend._prop
legend_list.append(legend)
else:
raise ValueError('Legends list contains invalid elements')
Expand Down

0 comments on commit b4b07a9

Please sign in to comment.