From d1f7f43dcc7ba361ed4f79ce57c23c085ee9eda4 Mon Sep 17 00:00:00 2001 From: Stefan Koegl Date: Wed, 15 Sep 2010 15:55:30 +0200 Subject: [PATCH] update width-calculation for bar-charts --- mygpo/publisher/templatetags/pcharts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mygpo/publisher/templatetags/pcharts.py b/mygpo/publisher/templatetags/pcharts.py index 40c9aa28..4c1259b8 100644 --- a/mygpo/publisher/templatetags/pcharts.py +++ b/mygpo/publisher/templatetags/pcharts.py @@ -18,7 +18,7 @@ def bar_chart(parts): parts = [ 'cht=bvg', # Vertical bar chart with grouped bars. - 'chs=%dx100' % ((bar_width + bar_space + group_space / 2) * len(parts)), + 'chs=%dx100' % ((bar_space + group_space) * (len(parts) + 1)), 'chl=%s' % '|'.join([x['x'] for x in parts]), 'chd=t:%s' % ','.join([ repr(int(x['y'])) for x in parts ]), 'chxt=x,y', # visible axes -- 2.11.4.GIT