Skip to content

Commit

Permalink
Fix Kozea#210
Browse files Browse the repository at this point in the history
  • Loading branch information
paradoxxxzero committed May 12, 2015
1 parent ea7bdca commit efbf663
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pygal/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(
opacity_hover='.9',
stroke_width='1',
stroke_style='round',
stroke_dasharray=(0, 0),
stroke_dasharray=None,
transition='250ms',
colors=(
'#ff5995', '#b6e354', '#feed6c', '#8cedff', '#9e6ffe',
Expand Down Expand Up @@ -72,18 +72,18 @@ def validate_stroke_values(self):

# stroke_style
self.stroke_style = self.stroke_style.lower().strip()
if not self.stroke_style in ['round', 'bevel', 'miter']:
if self.stroke_style not in ['round', 'bevel', 'miter']:
self.stroke_style = 'round'

# stroke_dasharray
if isinstance(self.stroke_dasharray, (list, tuple)):
if self.stroke_dasharray is None:
self.stroke_dasharray = 'none'
elif isinstance(self.stroke_dasharray, (list, tuple)):
self.stroke_dasharray = '%d,%d' % self.stroke_dasharray

if isinstance(self.stroke_dasharray, str):
elif isinstance(self.stroke_dasharray, str):
self.stroke_dasharray = re.sub(
re_dasharray_delimiters, ',', self.stroke_dasharray)

if not isinstance(self.stroke_dasharray, str):
else:
raise ValueError(
'stroke_dasharray not in proper form: tuple(int, int)')

Expand Down

0 comments on commit efbf663

Please sign in to comment.