Browse Source

Add a little margin on title size

pull/20/merge
Florian Mounier 12 years ago
parent
commit
5092a7482c
  1. 4
      demo/moulinrouge/tests.py
  2. 2
      pygal/graph/base.py

4
demo/moulinrouge/tests.py

@ -25,7 +25,9 @@ def get_test_routes(app):
@app.route('/test/bar_links')
def test_bar_links():
bar = Gauge(style=styles['neon'])
bar = Bar(style=styles['neon'])
# bar.js = ('http://l:2343/svg.jquery.js',
# 'http://l:2343/pygal-tooltips.js')
bar.add('1234', [
{'value': 10,
'label': 'Ten',

2
pygal/graph/base.py

@ -65,7 +65,7 @@ class BaseGraph(object):
if not self.title:
self.title = []
return
size = reverse_text_len(self.width, self.title_font_size)
size = reverse_text_len(self.width, self.title_font_size * 1.1)
title = self.title.strip()
self.title = []
while len(title) > size:

Loading…
Cancel
Save