Browse Source

Merge pull request #349 from yossisal/hz_show_y_guides

Hz show y guides
pull/373/merge
Mounier Florian 7 years ago committed by GitHub
parent
commit
d05be6cd3c
  1. 4
      pygal/graph/graph.py
  2. 2
      pygal/graph/horizontal.py

4
pygal/graph/graph.py

@ -229,7 +229,9 @@ class Graph(PublicApi):
if not self._y_labels or not self.show_y_labels: if not self._y_labels or not self.show_y_labels:
return 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 if (0 not in [label[1] for label in self._y_labels] and
self.show_y_guides): self.show_y_guides):

2
pygal/graph/horizontal.py

@ -38,6 +38,8 @@ class HorizontalGraph(Graph):
self._y_labels_major, self._x_labels_major) self._y_labels_major, self._x_labels_major)
self._x_2nd_labels, self._y_2nd_labels = ( self._x_2nd_labels, self._y_2nd_labels = (
self._y_2nd_labels, self._x_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): def _axes(self):
"""Set the _force_vertical flag when rendering axes""" """Set the _force_vertical flag when rendering axes"""

Loading…
Cancel
Save