Browse Source

Reverse horizontal series. Fix #229 Second edition

pull/242/head
Florian Mounier 10 years ago
parent
commit
8af2e77cb4
  1. 7
      pygal/graph/bar.py

7
pygal/graph/bar.py

@ -43,7 +43,12 @@ class Bar(Graph):
x += series_margin x += series_margin
width -= 2 * series_margin width -= 2 * series_margin
width /= self._order width /= self._order
x += serie.index * width if self.horizontal:
serie_index = self._order - serie.index - 1
else:
serie_index = serie.index
x += serie_index * width
serie_margin = width * self._serie_margin serie_margin = width * self._serie_margin
x += serie_margin x += serie_margin
width -= 2 * serie_margin width -= 2 * serie_margin

Loading…
Cancel
Save