事件分析标签分组项2

This commit is contained in:
Àî×ÚÕñ 2022-07-08 11:11:02 +08:00
parent 49c7668169
commit 650a12a430

View File

@ -412,6 +412,17 @@ async def event_model(
appgb = str(gb).replace("'", '')
groups.append(appgb)
item['groups'] = groups
else:
if group_label:
groups = []
gb = []
for name, idx in group_label.items():
gb.insert(idx, name)
# 去掉分组表现里面的''
appgb = str(gb).replace("'", '')
groups.append(appgb)
item['groups'] = groups
item['values'] = np.array(item['values'])[sort_key].tolist()
item['sum'] = np.array(item['sum'])[sort_key].tolist()
item['avg'] = np.array(item['avg'])[sort_key].tolist()
@ -1452,7 +1463,8 @@ async def scatter_model(
group_by = analysis.event_view['groupBy']
# 排除标签
true_group = [i for i in group_by if i['data_type'] != "user_label"]
columnName = true_group[-1]['columnName']
# columnName = true_group[-1]['columnName']
columnName = ''
if true_group != []:
# if columnName != '':
# # 按天分组