From d9e95f2186245317279ab5e85588cecb1ac2dc83 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sat, 27 Feb 2021 10:03:24 +0100 Subject: [PATCH] Feat: return empty fig --- recopytex/dashboard/exam_analysis/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recopytex/dashboard/exam_analysis/app.py b/recopytex/dashboard/exam_analysis/app.py index 87e540b..54e36f8 100644 --- a/recopytex/dashboard/exam_analysis/app.py +++ b/recopytex/dashboard/exam_analysis/app.py @@ -240,7 +240,7 @@ def update_final_scores_hist(data): assessment_scores = pd.DataFrame.from_records(data) if assessment_scores.empty: - return [{"data": [], "layout": []}] + return [go.Figure(data=[go.Scatter(x=[], y=[])])] ranges = np.linspace( -0.5, @@ -287,7 +287,7 @@ def update_competence_fig(data): scores = flat_df_students(scores).dropna(subset=["Score"]) if scores.empty: - return [{"data": [], "layout": []}] + return [go.Figure(data=[go.Scatter(x=[], y=[])])] scores = pp_q_scores(scores) pt = pd.pivot_table(