activity chart without save
This commit is contained in:
@@ -178,7 +178,7 @@ def interactive_hr_piechart(df,rower,title,totalseconds=0):
|
||||
if df.empty:
|
||||
return "","Not enough data to make a chart"
|
||||
|
||||
|
||||
|
||||
|
||||
df.sort_values(by='hr',inplace=True)
|
||||
df['timehr'] = df['deltat']*df['hr']
|
||||
@@ -401,7 +401,7 @@ def interactive_planchart(data,startdate,enddate):
|
||||
|
||||
return script,div
|
||||
|
||||
def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
def interactive_activitychart(workouts,startdate,enddate,stack='type',toolbar_location=None):
|
||||
|
||||
dates = []
|
||||
dates_sorting = []
|
||||
@@ -521,7 +521,7 @@ def interactive_activitychart(workouts,startdate,enddate,stack='type'):
|
||||
|
||||
p.plot_width=550
|
||||
p.plot_height=350
|
||||
p.toolbar_location = 'above'
|
||||
p.toolbar_location = toolbar_location
|
||||
p.sizing_mode = 'scale_width'
|
||||
url = "http://rowsandall.com/rowers/workout/@duration/"
|
||||
taptool = p.select(type=TapTool)
|
||||
|
||||
@@ -4906,6 +4906,7 @@ def history_view_data(request,userid=0):
|
||||
|
||||
totalsdict['nrworkouts'] = g_workouts.count()
|
||||
|
||||
# activity chart
|
||||
|
||||
# interactive hr pie chart
|
||||
if typeselect == 'All':
|
||||
|
||||
Reference in New Issue
Block a user