Browse Source

Convert the allow_interruptions kwargs to a full featured serie config option.

pull/307/head
Florian Mounier 9 years ago
parent
commit
51a9e9eb11
  1. 3
      pygal/config.py
  2. 3
      pygal/graph/line.py

3
pygal/config.py

@ -218,6 +218,9 @@ class CommonConfig(BaseConfig):
inner_radius = Key(
0, float, "Look", "Piechart inner radius (donut), must be <.9")
allow_interruptions = Key(
False, bool, "Look", "Break lines on None values")
class Config(CommonConfig):

3
pygal/graph/line.py

@ -35,7 +35,6 @@ class Line(Graph):
def __init__(self, *args, **kwargs):
"""Set _self_close as False, it's True for Radar like Line"""
self._self_close = False
self.allow_interruptions = kwargs.get('allow_interruptions', False)
super(Line, self).__init__(*args, **kwargs)
@cached_property
@ -143,7 +142,7 @@ class Line(Graph):
if serie.fill:
view_values = self._fill(view_values)
if self.allow_interruptions:
if serie.allow_interruptions:
# view_values are in form [(x1, y1), (x2, y2)]. We
# need to split that into multiple sequences if a
# None is present here

Loading…
Cancel
Save