Add exercise progress graphs to new person overview page
This commit is contained in:
7
utils.py
7
utils.py
@@ -469,3 +469,10 @@ def generate_plot(df, title):
|
||||
# Convert Plotly figure to HTML div
|
||||
plot_div = pio.to_html(fig, full_html=False)
|
||||
return plot_div
|
||||
|
||||
def calculate_estimated_1rm(weight, repetitions):
|
||||
# Ensure the inputs are numeric
|
||||
if repetitions == 0: # Avoid division by zero
|
||||
return 0
|
||||
estimated_1rm = round((100 * int(weight)) / (101.3 - 2.67123 * repetitions), 0)
|
||||
return int(estimated_1rm)
|
||||
Reference in New Issue
Block a user