From 816b7ccaa0f8850518b2e462f2b1796a7f37df3c Mon Sep 17 00:00:00 2001 From: DzhiWang <2429634486@qq.com> Date: Thu, 7 Dec 2023 19:28:47 +0800 Subject: [PATCH] add month_count in analysis --- app/analysis/analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/analysis/analysis.py b/app/analysis/analysis.py index 03e917a..c96b209 100644 --- a/app/analysis/analysis.py +++ b/app/analysis/analysis.py @@ -120,7 +120,7 @@ def month_count(wxid, year): msg_data = msg_db.get_messages_by_month(wxid, year) y_data = list(map(lambda x: x[1], msg_data)) x_axis = list(map(lambda x: x[0], msg_data)) - c = ( + m = ( Bar(init_opts=opts.InitOpts(width=f"{charts_width}px", height=f"{charts_height}px")) .add_xaxis(x_axis) .add_yaxis("消息数量", y_data, @@ -144,7 +144,7 @@ def month_count(wxid, year): ) return { - 'chart_data': c + 'chart_data': m }