Browse Source

Merge pull request #58 from signed0/master

Prevent automatic x-axis label truncation from being less than 1
pull/59/head
Mounier Florian 11 years ago
parent
commit
066450b5e6
  1. 1
      pygal/graph/graph.py

1
pygal/graph/graph.py

@ -135,6 +135,7 @@ class Graph(BaseGraph):
len(self._x_labels) - 1) len(self._x_labels) - 1)
truncation = reverse_text_len( truncation = reverse_text_len(
available_space, self.label_font_size) available_space, self.label_font_size)
truncation = max(truncation, 1)
if 0 not in [label[1] for label in self._x_labels]: if 0 not in [label[1] for label in self._x_labels]:
self.svg.node(axis, 'path', self.svg.node(axis, 'path',

Loading…
Cancel
Save