Commit 32f97c71 authored by Michal Čihař's avatar Michal Čihař

Move calculation to better place

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 8c8a3f08
......@@ -40,7 +40,6 @@ def render_activity(activity):
# Preprocess data for chart
maximum = max([l[1] for l in activity] + [1])
step = 780.0 / len(activity)
width = step / 2
# Prepare image
image = Image.new('RGB', (800, 100), 'white')
......@@ -73,7 +72,7 @@ def render_activity(activity):
(
20 + current,
84,
20 + current + width,
20 + current + (step / 2),
84 - value[1] * 78.0 / maximum
),
fill=(0, 67, 118)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment