make sure floats are used in calculating percentages
This commit is contained in:
parent
117a458fa0
commit
e02700404b
|
@ -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()
|
||||
|
|
Reference in New Issue