diff --git a/app.py b/app.py
index decec10..b59e634 100644
--- a/app.py
+++ b/app.py
@@ -244,8 +244,9 @@ def get_exercise_progress_for_user(person_id, exercise_id):
forecast_enabled = request.args.get('forecast', '').lower() in ('1', 'true', 'yes', 'on')
forecast_weeks = request.args.get('forecast_weeks', type=int, default=8)
forecast_weeks = max(4, min(forecast_weeks, 26))
- forecast_target_reps = request.args.get('forecast_reps', type=int, default=5)
- forecast_target_reps = max(1, min(forecast_target_reps, 12))
+ forecast_target_reps = request.args.get('forecast_reps', type=int)
+ if forecast_target_reps is not None:
+ forecast_target_reps = max(1, min(forecast_target_reps, 20))
if epoch == 'Custom' and (min_date is None or max_date is None):
(min_date, max_date) = db.get_exercise_earliest_and_latest_dates(person_id, exercise_id)
diff --git a/db.py b/db.py
index 26e988e..8b9b0f9 100644
--- a/db.py
+++ b/db.py
@@ -405,7 +405,7 @@ class DataBase():
def get_all_exercises(self):
return self.exercises.get("")
- def get_exercise_progress_for_user(self, person_id, exercise_id, min_date=None, max_date=None, epoch='all', degree=1, forecast_enabled=False, forecast_weeks=8, forecast_target_reps=5):
+ def get_exercise_progress_for_user(self, person_id, exercise_id, min_date=None, max_date=None, epoch='all', degree=1, forecast_enabled=False, forecast_weeks=8, forecast_target_reps=None):
today = datetime.now()
if epoch == '1M':
min_date = today - relativedelta(months=1)
diff --git a/templates/partials/sparkline.html b/templates/partials/sparkline.html
index e0ebe94..abc3494 100644
--- a/templates/partials/sparkline.html
+++ b/templates/partials/sparkline.html
@@ -32,12 +32,17 @@ M{% for value, position in lower_points %}{{ (((position * vb_width) + margin) |
{% endfor %}
{% endmacro %}
-{% macro forecast_circles(data_points, labels, color) %}
+{% macro forecast_circles(data_points, details, color) %}
{% for value, position in data_points %}
{% set x = (position * vb_width)+margin %}
{% set y = (vb_height - value)+margin %}
| Reps | +Est. load | +Model range | +Proj. E1RM | +
|---|---|---|---|
| {{ top_set.repetitions }} | +{{ top_set.weight_display }}kg | +{{ top_set.lower_weight_display }}–{{ top_set.upper_weight_display }}kg | +{{ top_set.e1rm_display }}kg | +