Skip to content

Commit

Permalink
Merge pull request Kozea#349 from yossisal/hz_show_y_guides
Browse files Browse the repository at this point in the history
Hz show y guides
  • Loading branch information
paradoxxxzero authored Jul 5, 2017
2 parents 705fc8f + cdcdb3a commit d05be6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pygal/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ def _y_axis(self):
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):
Expand Down
2 changes: 2 additions & 0 deletions pygal/graph/horizontal.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def _post_compute(self):
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"""
Expand Down

0 comments on commit d05be6c

Please sign in to comment.