summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-12-06 18:34:00 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-12-06 18:34:00 (GMT)
commite02700404be7e4e53f9629db4266b3aca19c31c4 (patch)
treee1f8ff5e1e146249315dc5a37a2f31da2bbc63ff
parent117a458fa0e4ed67eb7d5dc4121c6988c9ebcf28 (diff)
downloadtabellio.webviews-e02700404be7e4e53f9629db4266b3aca19c31c4.zip
tabellio.webviews-e02700404be7e4e53f9629db4266b3aca19c31c4.tar.gz
tabellio.webviews-e02700404be7e4e53f9629db4266b3aca19c31c4.tar.bz2
make sure floats are used in calculating percentages
-rw-r--r--tabellio/webviews/deputy.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tabellio/webviews/deputy.py b/tabellio/webviews/deputy.py
index 1aea613..d1835d0 100644
--- a/tabellio/webviews/deputy.py
+++ b/tabellio/webviews/deputy.py
@@ -241,7 +241,7 @@ class GenderStatsView(BrowserView):
baseline = 320/2-30
else:
baseline = 320/2+30
- percent = int(round(100*sum(group.to_list())/plot.total))
+ percent = int(round(100.*sum(group.to_list())/plot.total))
plot.context.set_source_rgba(*plot.series_colors[number][:4])
plot.context.rectangle(410, baseline-25, 40, 40)
plot.context.fill()