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)