diff --git a/pygal/graph/graph.py b/pygal/graph/graph.py index 401723e..8c95609 100644 --- a/pygal/graph/graph.py +++ b/pygal/graph/graph.py @@ -369,8 +369,8 @@ class Graph(BaseGraph): + .3 * self.legend_font_size ).text = truncated #as is decorated with title I do not think we need title here - #if truncated != title['title']: - # self.svg.node(legend, 'title').text = title['title'] + if truncated != title['title']: + self.svg.node(legend, 'title').text = title['title'] else: truncated = truncate(title, truncation) # Serious magical numbers here diff --git a/pygal/graph/horizontalbar.py b/pygal/graph/horizontalbar.py index 5d7ea3b..3cac964 100644 --- a/pygal/graph/horizontalbar.py +++ b/pygal/graph/horizontalbar.py @@ -22,7 +22,6 @@ Horizontal bar graph """ from pygal.graph.horizontal import HorizontalGraph from pygal.graph.bar import Bar -from pygal.util import cached_property class HorizontalBar(HorizontalGraph, Bar): """Horizontal Bar graph""" diff --git a/pygal/test/test_graph.py b/pygal/test/test_graph.py index 4367f2d..0ae11b9 100644 --- a/pygal/test/test_graph.py +++ b/pygal/test/test_graph.py @@ -43,10 +43,7 @@ def test_render_to_file(Chart, datas): chart.render_to_file(file_name) with open(file_name) as f: assert 'pygal' in f.read() - if Chart == pygal.HorizontalBar: - pass - else: - os.remove(file_name) + os.remove(file_name) def test_render_to_png(Chart, datas):