From 76b66492c7d8aa82c1f3a3210637b9cff061a172 Mon Sep 17 00:00:00 2001 From: Wiktor Niesiobedzki Date: Mon, 21 Jan 2013 16:20:07 +0100 Subject: [PATCH] fixing whitespaces and box computations --- pygal/graph/base.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pygal/graph/base.py b/pygal/graph/base.py index d77e526..7dc5fbd 100644 --- a/pygal/graph/base.py +++ b/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):