start of UI for Analysis -> CP chart
This commit is contained in:
@@ -1036,6 +1036,7 @@ analysischoices = (
|
|||||||
('flexall','Cumulative Flex Chart'),
|
('flexall','Cumulative Flex Chart'),
|
||||||
('stats','Statistics'),
|
('stats','Statistics'),
|
||||||
('compare','Compare'),
|
('compare','Compare'),
|
||||||
|
('cp','CP chart'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,8 @@
|
|||||||
var yaxis2 = $("#id_yaxis2").parent().parent();
|
var yaxis2 = $("#id_yaxis2").parent().parent();
|
||||||
var plottype = $("#id_plottype").parent().parent();
|
var plottype = $("#id_plottype").parent().parent();
|
||||||
|
|
||||||
|
var reststrokes = $("#id_includereststrokes").parent().parent();
|
||||||
|
|
||||||
// Hide the fields.
|
// Hide the fields.
|
||||||
// Use JS to do this in case the user doesn't have JS
|
// Use JS to do this in case the user doesn't have JS
|
||||||
// enabled.
|
// enabled.
|
||||||
@@ -102,6 +104,7 @@
|
|||||||
yaxis1.hide();
|
yaxis1.hide();
|
||||||
yaxis2.hide();
|
yaxis2.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
|
reststrokes.show();
|
||||||
|
|
||||||
if (functionfield.val() == 'boxplot') {
|
if (functionfield.val() == 'boxplot') {
|
||||||
plotfield.show();
|
plotfield.show();
|
||||||
@@ -161,6 +164,7 @@
|
|||||||
yaxis1.hide();
|
yaxis1.hide();
|
||||||
yaxis2.hide();
|
yaxis2.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
|
reststrokes.show();
|
||||||
}
|
}
|
||||||
else if (Value=='histo') {
|
else if (Value=='histo') {
|
||||||
plotfield.show();
|
plotfield.show();
|
||||||
@@ -178,6 +182,7 @@
|
|||||||
yaxis1.hide();
|
yaxis1.hide();
|
||||||
yaxis2.hide();
|
yaxis2.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
|
reststrokes.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (Value=='trendflex') {
|
else if (Value=='trendflex') {
|
||||||
@@ -196,6 +201,7 @@
|
|||||||
yaxis1.hide();
|
yaxis1.hide();
|
||||||
yaxis2.hide();
|
yaxis2.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
|
reststrokes.show();
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (Value=='flexall') {
|
else if (Value=='flexall') {
|
||||||
@@ -214,6 +220,7 @@
|
|||||||
binsize.hide();
|
binsize.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
errorbars.hide();
|
errorbars.hide();
|
||||||
|
reststrokes.show();
|
||||||
}
|
}
|
||||||
else if (Value=='stats') {
|
else if (Value=='stats') {
|
||||||
xaxis.hide();
|
xaxis.hide();
|
||||||
@@ -227,6 +234,7 @@
|
|||||||
binsize.hide();
|
binsize.hide();
|
||||||
errorbars.hide();
|
errorbars.hide();
|
||||||
plottype.hide();
|
plottype.hide();
|
||||||
|
reststrokes.show();
|
||||||
}
|
}
|
||||||
else if (Value=='compare') {
|
else if (Value=='compare') {
|
||||||
xaxis.show();
|
xaxis.show();
|
||||||
@@ -244,6 +252,25 @@
|
|||||||
binsize.hide();
|
binsize.hide();
|
||||||
plottype.show();
|
plottype.show();
|
||||||
errorbars.hide();
|
errorbars.hide();
|
||||||
|
reststrokes.show();
|
||||||
|
}
|
||||||
|
else if (Value=='cp') {
|
||||||
|
plotfield.hide();
|
||||||
|
spmmin.hide();
|
||||||
|
spmmax.hide();
|
||||||
|
workmin.hide();
|
||||||
|
workmax.hide();
|
||||||
|
x_param.hide();
|
||||||
|
y_param.hide();
|
||||||
|
groupby.hide();
|
||||||
|
palette.hide();
|
||||||
|
binsize.hide();
|
||||||
|
errorbars.hide();
|
||||||
|
xaxis.hide();
|
||||||
|
yaxis1.hide();
|
||||||
|
yaxis2.hide();
|
||||||
|
plottype.hide();
|
||||||
|
reststrokes.hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -500,6 +500,9 @@ def histodata(workouts, options):
|
|||||||
|
|
||||||
return(script,div)
|
return(script,div)
|
||||||
|
|
||||||
|
def cpdata(workouts, options):
|
||||||
|
return ('','Not Yet Implemented')
|
||||||
|
|
||||||
def statsdata(workouts, options):
|
def statsdata(workouts, options):
|
||||||
includereststrokes = options['includereststrokes']
|
includereststrokes = options['includereststrokes']
|
||||||
spmmin = options['spmmin']
|
spmmin = options['spmmin']
|
||||||
@@ -725,6 +728,8 @@ def analysis_view_data(request,userid=0):
|
|||||||
script,div = statsdata(workouts,options)
|
script,div = statsdata(workouts,options)
|
||||||
elif function == 'compare':
|
elif function == 'compare':
|
||||||
script,div = comparisondata(workouts,options)
|
script,div = comparisondata(workouts,options)
|
||||||
|
elif function == 'cp':
|
||||||
|
script, div = cpdata(workouts, options)
|
||||||
else:
|
else:
|
||||||
script = ''
|
script = ''
|
||||||
div = 'Unknown analysis functions'
|
div = 'Unknown analysis functions'
|
||||||
|
|||||||
Reference in New Issue
Block a user