dynamic form for trendflex/boxplot combo
This commit is contained in:
@@ -91,6 +91,7 @@ def analysis_new(request,userid=0,function='boxplot'):
|
||||
if chartform.is_valid():
|
||||
for key, value in chartform.cleaned_data.items():
|
||||
options[key] = value
|
||||
|
||||
|
||||
form = WorkoutMultipleCompareForm(request.POST)
|
||||
if form.is_valid():
|
||||
@@ -216,28 +217,18 @@ def analysis_new(request,userid=0,function='boxplot'):
|
||||
|
||||
|
||||
def boxplotdata(workouts,options):
|
||||
try:
|
||||
includereststrokes = options['includereststrokes']
|
||||
spmmin = options['spmmin']
|
||||
spmmax = options['spmmax']
|
||||
workmin = options['workmin']
|
||||
workmax = options['workmax']
|
||||
ids = options['ids']
|
||||
userid = options['userid']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
except KeyError:
|
||||
includereststrokes = False
|
||||
spmmin = 15
|
||||
spmmax = 55
|
||||
workmin = 0
|
||||
workmax = 55
|
||||
ids = []
|
||||
userid = 0
|
||||
plotfield = 'spm'
|
||||
function = 'boxplot'
|
||||
|
||||
|
||||
|
||||
includereststrokes = options['includereststrokes']
|
||||
spmmin = options['spmmin']
|
||||
spmmax = options['spmmax']
|
||||
workmin = options['workmin']
|
||||
workmax = options['workmax']
|
||||
ids = options['ids']
|
||||
userid = options['userid']
|
||||
plotfield = options['plotfield']
|
||||
function = options['function']
|
||||
|
||||
workstrokesonly = not includereststrokes
|
||||
labeldict = {
|
||||
int(w.id): w.__str__() for w in workouts
|
||||
|
||||
Reference in New Issue
Block a user