From 9648a674e5f1e5fccf37679072d105f2f61674b3 Mon Sep 17 00:00:00 2001 From: yossisal Date: Wed, 19 Oct 2016 17:44:25 +0200 Subject: [PATCH 1/2] transpose show_x/y_guides --- pygal/graph/horizontal.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygal/graph/horizontal.py b/pygal/graph/horizontal.py index 3079ca5..9939b21 100644 --- a/pygal/graph/horizontal.py +++ b/pygal/graph/horizontal.py @@ -38,6 +38,8 @@ class HorizontalGraph(Graph): self._y_labels_major, self._x_labels_major) self._x_2nd_labels, self._y_2nd_labels = ( self._y_2nd_labels, self._x_2nd_labels) + self.show_y_guides, self.show_x_guides = ( + self.show_x_guides, self.show_y_guides) def _axes(self): """Set the _force_vertical flag when rendering axes""" From cdcdb3aab756075393352d95561af98010da9c48 Mon Sep 17 00:00:00 2001 From: yossisal Date: Wed, 19 Oct 2016 17:45:42 +0200 Subject: [PATCH 2/2] set y axis class according to show_y_guide --- pygal/graph/graph.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pygal/graph/graph.py b/pygal/graph/graph.py index c993597..87d8333 100644 --- a/pygal/graph/graph.py +++ b/pygal/graph/graph.py @@ -230,7 +230,9 @@ class Graph(PublicApi): if not self._y_labels or not self.show_y_labels: return - axis = self.svg.node(self.nodes['plot'], class_="axis y") + axis = self.svg.node(self.nodes['plot'], class_="axis y%s" % ( + ' always_show' if self.show_y_guides else '' + )) if (0 not in [label[1] for label in self._y_labels] and self.show_y_guides):