|
@@ -92,6 +92,7 @@ def put_analysis_report_to_html(args, df_predict, df_accuracy):
|
|
|
label = args['label']
|
|
|
label_pre = args['label_pre']
|
|
|
farmId = args['farmId']
|
|
|
+ points = args['points'].split(',')
|
|
|
acc_flag = df_accuracy.shape[0]
|
|
|
# 获取所有的模型
|
|
|
models = df_predict['model'].unique()
|
|
@@ -114,7 +115,7 @@ def put_analysis_report_to_html(args, df_predict, df_accuracy):
|
|
|
df_predict = df_predict.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
|
if acc_flag > 0:
|
|
|
df_accuracy = df_accuracy.applymap(lambda x: float(x.to_decimal()) if isinstance(x, Decimal128) else float(x) if isinstance(x, numbers.Number) else x).sort_values(by=col_time)
|
|
|
- figs = [create_fig(df_predict, col_time, label, label_pre, p) for p in [1, 8, 16, 17]]
|
|
|
+ figs = [create_fig(df_predict, col_time, label, label_pre, p) for p in points]
|
|
|
# 将折线图保存为 HTML 片段
|
|
|
power_htmls = [pio.to_html(f, full_html=False) for f in figs]
|
|
|
power_htmls = ["<div class='plot-container'>{}</div>".format(html) for html in power_htmls]
|