From 92cb2a98d10a2c2429cee407cfd60cbb6eedf550 Mon Sep 17 00:00:00 2001 From: Nathan Villaescusa Date: Thu, 12 Dec 2013 14:38:38 -0800 Subject: [PATCH] Fix a bug with secondary y-axis and formatted values _y_2nd_labels will contain strings that will sometimes be human formatted and not cast-able to a float. --- pygal/graph/graph.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pygal/graph/graph.py b/pygal/graph/graph.py index a1a454d..7a9e5d7 100644 --- a/pygal/graph/graph.py +++ b/pygal/graph/graph.py @@ -495,10 +495,9 @@ class Graph(BaseGraph): self._y_2nd_labels = [(self._format(ymin + i * scale), pos) for i, pos in enumerate(y_pos)] - min_2nd = float(self._y_2nd_labels[0][0]) self._scale = left_range / right_range self._scale_diff = y_pos[0] - self._scale_min_2nd = min_2nd + self._scale_min_2nd = ymin def _post_compute(self): pass