Private
Public Access
1
0

dynamic form for trendflex/boxplot combo

This commit is contained in:
Sander Roosendaal
2019-04-28 18:02:44 +02:00
parent f1888ab9fa
commit 5d18644f9e
4 changed files with 145 additions and 61 deletions

View File

@@ -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