Modify sparkline so it ranges from earliest workout date to current date
This commit is contained in:
2
app.py
2
app.py
@@ -674,7 +674,7 @@ def generate_daily_duration_sparkline(workouts):
|
|||||||
|
|
||||||
# Determine date range based on workouts data
|
# Determine date range based on workouts data
|
||||||
start_date = workouts[-1]['start_time_date']
|
start_date = workouts[-1]['start_time_date']
|
||||||
end_date = workouts[0]['start_time_date']
|
end_date = datetime.now().date() # workouts[0]['start_time_date']
|
||||||
|
|
||||||
# Build a mapping of dates to their respective durations for easier lookup
|
# Build a mapping of dates to their respective durations for easier lookup
|
||||||
workouts_by_date = {w['start_time_date']: int(
|
workouts_by_date = {w['start_time_date']: int(
|
||||||
|
|||||||
Reference in New Issue
Block a user