Browse Source

fixing whitespaces and box computations

pull/20/head
Wiktor Niesiobedzki 12 years ago
parent
commit
76b66492c7
  1. 6
      pygal/graph/base.py

6
pygal/graph/base.py

@ -104,7 +104,7 @@ class BaseGraph(object):
sqrt(self._order) - 1) * 1.5 + h_max
else:
self.margin.right += 10 + w + self.legend_box_size
if self.show_legend and self.secondary_series:
h, w = get_texts_box(
map(lambda x: truncate(x, self.truncate_legend or 15),
@ -117,7 +117,6 @@ class BaseGraph(object):
else:
self.margin.left += w + self.legend_box_size
if self.title:
h, _ = get_text_box(self.title[0], self.title_font_size)
self.margin.top += len(self.title) * (10 + h)
@ -138,8 +137,7 @@ class BaseGraph(object):
h, w = get_texts_box(
cut(self._y_labels), self.label_font_size)
self.margin.left += 10 + max(
w * cos(rad(self.y_label_rotation)), w)
w * cos(rad(self.y_label_rotation)), h)
@cached_property
def _legends(self):

Loading…
Cancel
Save