Private
Public Access
1
0

activity chart without duplicates

This commit is contained in:
Sander Roosendaal
2018-11-14 10:56:42 +01:00
parent 840e0b55f3
commit db2f31ff5b
2 changed files with 24 additions and 5 deletions

View File

@@ -237,8 +237,6 @@ def interactive_boxchart(datadf,fieldname,extratitle=''):
def interactive_activitychart(workouts,startdate,enddate,stack='type'):
if len(workouts) == 0:
return "",""
dates = []
dates_sorting = []
@@ -316,7 +314,10 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
label = CatAttr(columns=['date'], sort=False),
xlabel='Date',
ylabel='Time',
title='Activity',
title='Activity {d1} to {d2}'.format(
d1 = startdate.strftime("%Y-%m-%d"),
d2 = enddate.strftime("%Y-%m-%d"),
),
stack=stack,
plot_width=350,
plot_height=250,