Skip to content

Commit

Permalink
metric lists activities used mean instead of sum
Browse files Browse the repository at this point in the history
  • Loading branch information
luutuankiet authored Feb 25, 2024
1 parent 0be47f9 commit d465ab7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/charts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,13 @@ def highlight_row(row):

col1,col2,col3 = st.columns(3)

col1.metric("completed",value=int(completed_df.iloc[:,2].sum()) if completed_df_delta.shape[0] > 0 else None,
col1.metric("completed",value=int(completed_df.iloc[:,2].mean()) if completed_df_delta.shape[0] > 0 else None,
delta=f"last item {completed_df_delta.iloc[0,3] }" if completed_df_delta.shape[0] > 0 else None,
delta_color="off")
col2.metric("created",value=int(created_df.iloc[:,2].sum()) if created_df_delta.shape[0] > 0 else None,
col2.metric("created",value=int(created_df.iloc[:,2].mean()) if created_df_delta.shape[0] > 0 else None,
delta=f"last item {created_df_delta.iloc[0,3]}" if created_df_delta.shape[0] > 0 else None,
delta_color="off")
col3.metric("active",value=int(active_df .iloc[:,2].sum()) if active_df_delta.shape[0] > 0 else None,
col3.metric("active",value=int(active_df .iloc[:,2].mean()) if active_df_delta.shape[0] > 0 else None,
delta=f"last item {active_df_delta.iloc[0,3] }" if active_df_delta.shape[0] > 0 else None,
delta_color="off")

Expand Down

0 comments on commit d465ab7

Please sign in to comment.