Browse Source

Merge pull request #39 from signed0/master

Fix bug with None y-values for charts with a secondary y-axis.
pull/58/head
Mounier Florian 12 years ago
parent
commit
31860ec15f
  1. 8
      pygal/graph/line.py

8
pygal/graph/line.py

@ -60,9 +60,11 @@ class Line(Graph):
def line(self, serie_node, serie, rescale=False):
"""Draw the line serie"""
if rescale and self.secondary_series:
points = [
(x, self._scale_diff + (y - self._scale_min_2nd) * self._scale)
for x, y in serie.points]
points = []
for x, y in serie.points:
if y is not None:
y = self._scale_diff + (y - self._scale_min_2nd) * self._scale
points.append((x, y))
else:
points = serie.points
view_values = list(map(self.view, points))

Loading…
Cancel
Save