Browse Source

Fix /0

pull/8/head
Florian Mounier 13 years ago
parent
commit
da0cb8a5f6
  1. 2
      pygal/config.py
  2. 2
      pygal/graph/graph.py

2
pygal/config.py

@ -59,6 +59,8 @@ class Config(object):
y_label_rotation = 0 y_label_rotation = 0
#: Set to false to remove legend #: Set to false to remove legend
show_legend = True show_legend = True
#: Set to true to position legend at bottom
legend_at_bottom = True
#: Set to false to remove dots #: Set to false to remove dots
show_dots = True show_dots = True
#: Size of legend boxes #: Size of legend boxes

2
pygal/graph/graph.py

@ -106,7 +106,7 @@ class Graph(BaseGraph):
axis = self.svg.node(self.nodes['plot'], class_="axis x") axis = self.svg.node(self.nodes['plot'], class_="axis x")
truncation = self.truncate_label truncation = self.truncate_label
if not truncation: if not truncation:
if self.x_label_rotation: if self.x_label_rotation or len(self._x_labels) <= 1:
truncation = 25 truncation = 25
else: else:
first_label_position = self.view.x(self._x_labels[0][1]) first_label_position = self.view.x(self._x_labels[0][1])

Loading…
Cancel
Save