added histogram
need to filter on spm, wps
This commit is contained in:
@@ -24,11 +24,13 @@ def analysis_new(request,userid=0,function='boxplot'):
|
||||
user = r.user
|
||||
userid = user.id
|
||||
|
||||
|
||||
if 'options' in request.session:
|
||||
options = request.session['options']
|
||||
else:
|
||||
options=defaultoptions
|
||||
|
||||
options['userid'] = userid
|
||||
try:
|
||||
workouttypes = options['workouttypes']
|
||||
except KeyError:
|
||||
@@ -409,7 +411,23 @@ def trendflexdata(workouts, options,userid=0):
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script,div)
|
||||
|
||||
def histodata(workouts, options):
|
||||
includereststrokes = options['includereststrokes']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
|
||||
script, div = interactive_histoall(workouts,plotfield,includereststrokes)
|
||||
|
||||
|
||||
scripta = script.split('\n')[2:-1]
|
||||
script = ''.join(scripta)
|
||||
|
||||
return(script,div)
|
||||
|
||||
|
||||
def boxplotdata(workouts,options):
|
||||
|
||||
|
||||
@@ -516,6 +534,8 @@ def analysis_view_data(request,userid=0):
|
||||
script, div = boxplotdata(workouts,options)
|
||||
elif function == 'trendflex':
|
||||
script, div = trendflexdata(workouts, options,userid=userid)
|
||||
elif function == 'histo':
|
||||
script, div = histodata(workouts, options)
|
||||
else:
|
||||
script = ''
|
||||
div = 'Unknown analysis functions'
|
||||
|
||||
Reference in New Issue
Block a user