Skip to content

Commit

Permalink
fixed bug by creating the delta in outer
Browse files Browse the repository at this point in the history
  • Loading branch information
luutuankiet committed Feb 20, 2024
1 parent f8b9032 commit 427df7a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/charts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,21 @@ def highlight_row(row):
loops = loops_count['content'].loc[0]
lines = loops.split('\n')
counter = 0
compare_clarify = int(tags_count['cnt_clarifyme'].loc[0])
for line in lines:
if line != '':
counter+=1

compare_clarify = int(tags_count['cnt_clarifyme'].loc[0])
counter_delta = counter - compare_clarify
st.write("## open loops count (rough estimation)")
st.write()
col1,col2,col3 = st.columns(3)
with col2:

st.metric(
"open loops vs to clarify",
value = f"{counter} loops to capture",
delta = f"{compare_clarify} vs captured loops to clarify",
delta = f"{counter_delta} vs captured loops to clarify",
delta_color="inverse",
# help="compared to number of items to clarify"
)
Expand Down

0 comments on commit 427df7a

Please sign in to comment.