fix: handle metrics without data

add-more-languages
Meng Zhang 2023-04-03 23:38:26 +08:00
parent c358859e28
commit a60e765a1d
1 changed files with 2 additions and 4 deletions

View File

@ -46,10 +46,6 @@ def plot_summary():
st.metric("Accept Rate", f"{round(ratio)} %")
plot_summary()
st.write("---")
def plot_charts():
st.markdown("### Completion Events")
st.line_chart(df, x="Date")
@ -60,6 +56,8 @@ def plot_charts():
if len(df) > 0:
plot_summary()
st.write("---")
plot_charts()
else:
st.markdown("No data available")