Browse Source

Merge pull request #147 from sirlark/classed_zero_axes

Adds an extra class (axis) to horizontal guides if the label is "0"
pull/185/head
Mounier Florian 10 years ago
parent
commit
ebbab47792
  1. 6
      pygal/graph/graph.py

6
pygal/graph/graph.py

@ -154,7 +154,8 @@ class Graph(BaseGraph):
self.svg.node(
guides, 'path',
d='M%f %f v%f' % (x or 0, 0, self.view.height),
class_='%s%sline' % (
class_='%s%s%sline' % (
'axis ' if label == "0" else '',
'major ' if major else '',
'guide ' if position != 0 and not last_guide else ''))
y += .5 * self.label_font_size + 5
@ -229,7 +230,8 @@ class Graph(BaseGraph):
self.svg.node(
guides, 'path',
d='M%f %f h%f' % (0, y, self.view.width),
class_='%s%sline' % (
class_='%s%s%sline' % (
'axis ' if label == "0" else '',
'major ' if major else '',
'guide ' if position != 0 else ''))
text = self.svg.node(

Loading…
Cancel
Save