From 542624f682e94e6b595dba35d471911c80092c3b Mon Sep 17 00:00:00 2001 From: Florian Mounier Date: Thu, 4 Oct 2012 12:06:35 +0200 Subject: [PATCH] Fix python 3.2 --- pygal/graph/bar.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pygal/graph/bar.py b/pygal/graph/bar.py index abbef8b..1c8b2fb 100644 --- a/pygal/graph/bar.py +++ b/pygal/graph/bar.py @@ -78,8 +78,10 @@ class Bar(Graph): self._static_value(serie_node, val, x_center, y_center) def _compute(self): - self._box.ymin = min(self._min, self.zero) - self._box.ymax = max(self._max, self.zero) + if self._min: + self._box.ymin = min(self._min, self.zero) + if self._max: + self._box.ymax = max(self._max, self.zero) x_pos = [ x / self._len for x in range(self._len + 1)