From f8fa983d9f763901cfd83d9eb851480f31b6729b Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 18 Nov 2021 18:59:05 +0200 Subject: [PATCH] fsdfds --- files/routes/static.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/routes/static.py b/files/routes/static.py index bf3d64a77..0073bd398 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -87,12 +87,12 @@ def cached_chart(): ) today_cutoff = calendar.timegm(midnight_this_morning) - day = 3600 * 24 + day = 3600 * 200 day_cutoffs = [today_cutoff - day * i for i in range(days)] day_cutoffs.insert(0, calendar.timegm(now)) - daily_times = [time.strftime("%d", time.gmtime(day_cutoffs[i + 1])) for i in range(len(day_cutoffs) - 1)][2:][::-1] + daily_times = [time.strftime("%d/%m", time.gmtime(day_cutoffs[i + 1])) for i in range(len(day_cutoffs) - 1)][2:][::-1] daily_signups = [g.db.query(User.id).filter(User.created_utc < day_cutoffs[i], User.created_utc > day_cutoffs[i + 1]).count() for i in range(len(day_cutoffs) - 1)][2:][::-1] @@ -100,6 +100,8 @@ def cached_chart(): comment_stats = [g.db.query(Comment.id).filter(Comment.created_utc < day_cutoffs[i], Comment.created_utc > day_cutoffs[i + 1],Comment.is_banned == False, Comment.author_id != 1).count() for i in range(len(day_cutoffs) - 1)][2:][::-1] + plt.rcParams["figure.figsize"] = (20,20) + signup_chart = plt.subplot2grid((20, 4), (0, 0), rowspan=5, colspan=4) posts_chart = plt.subplot2grid((20, 4), (7, 0), rowspan=5, colspan=4) comments_chart = plt.subplot2grid((20, 4), (14, 0), rowspan=5, colspan=4)