mirror of
https://github.com/LC044/WeChatMsg
synced 2025-02-23 03:22:17 +08:00
add month_count in analysis
This commit is contained in:
parent
e793fa0073
commit
816b7ccaa0
@ -120,7 +120,7 @@ def month_count(wxid, year):
|
|||||||
msg_data = msg_db.get_messages_by_month(wxid, year)
|
msg_data = msg_db.get_messages_by_month(wxid, year)
|
||||||
y_data = list(map(lambda x: x[1], msg_data))
|
y_data = list(map(lambda x: x[1], msg_data))
|
||||||
x_axis = list(map(lambda x: x[0], 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"))
|
Bar(init_opts=opts.InitOpts(width=f"{charts_width}px", height=f"{charts_height}px"))
|
||||||
.add_xaxis(x_axis)
|
.add_xaxis(x_axis)
|
||||||
.add_yaxis("消息数量", y_data,
|
.add_yaxis("消息数量", y_data,
|
||||||
@ -144,7 +144,7 @@ def month_count(wxid, year):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'chart_data': c
|
'chart_data': m
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user