Skip to content

Commit

Permalink
Fix crash with no values when the print_values_position param is set
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Marc Martins committed Oct 28, 2016
1 parent 9c9e337 commit 3d7911e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygal/graph/graph.py
Expand Up @@ -729,9 +729,9 @@ def _compute_margin(self):
if self.print_values_position == 'top':
gh = self.height - self.margin_box.y
alpha = 1.1 * (self.style.value_font_size / gh) * self._box.height
if self._max > 0:
if self._max and self._max > 0:
self._box.ymax += alpha
if self._min < 0:
if self._min and self._min < 0:
self._box.ymin -= alpha

def _confidence_interval(self, node, x, y, value, metadata):
Expand Down

0 comments on commit 3d7911e

Please sign in to comment.