adding time plot
This commit is contained in:
@@ -33,6 +33,8 @@
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
$("#id_script").replaceWith('<div id="id_script">'+data.script+'</d'+'iv>');
|
$("#id_script").replaceWith('<div id="id_script">'+data.script+'</d'+'iv>');
|
||||||
$("#id_chart").replaceWith('<div id="id_chart">'+data.div+'</d'+'iv>');
|
$("#id_chart").replaceWith('<div id="id_chart">'+data.div+'</d'+'iv>');
|
||||||
|
$("#ds").replaceWith('<div id="ds">'+data.ds+'</d'+'iv>');
|
||||||
|
$("#dd").replaceWith('<div id="dd">'+data.dd+'</d'+'iv>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -89,9 +91,17 @@ $( function() {
|
|||||||
<div id="id_script">
|
<div id="id_script">
|
||||||
{{ the_script |safe }}
|
{{ the_script |safe }}
|
||||||
</div>
|
</div>
|
||||||
|
<div id="ds">
|
||||||
|
{{ ds |safe }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<h1>In Stroke Metrics</h1>
|
<h1>In Stroke Metrics</h1>
|
||||||
<ul class="main-content">
|
<ul class="main-content">
|
||||||
|
<li class="grid_4">
|
||||||
|
<div id="dd" class="flexplot">
|
||||||
|
{{ dd|safe }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="grid_4">
|
<li class="grid_4">
|
||||||
<div id="id_chart" class="flexplot">
|
<div id="id_chart" class="flexplot">
|
||||||
{{ the_div|safe }}
|
{{ the_div|safe }}
|
||||||
|
|||||||
@@ -2950,6 +2950,26 @@ def instroke_chart_interactive(request, id=0):
|
|||||||
spm_min,
|
spm_min,
|
||||||
spm_max)
|
spm_max)
|
||||||
|
|
||||||
|
# change to range spm_min to spm_max
|
||||||
|
vals, units, typ = rowdata.updateinterval_metric(
|
||||||
|
' Cadence (stokes/min)', spm_min, mode='larger',
|
||||||
|
debug=False, smoothwindow=2.,)
|
||||||
|
|
||||||
|
intervalstats = rowdata.allstats()
|
||||||
|
itime, idist, itype = rowdata.intervalstats_values()
|
||||||
|
|
||||||
|
intervaldata = {
|
||||||
|
'itime': itime,
|
||||||
|
'idist': idist,
|
||||||
|
'itype': itype,
|
||||||
|
'selector': '',
|
||||||
|
'normp': 0,
|
||||||
|
'normv': 0,
|
||||||
|
}
|
||||||
|
ds, dd = interactive_chart(encoder.decode_hex(
|
||||||
|
id), promember=1, intervaldata=intervaldata)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
breadcrumbs = [
|
breadcrumbs = [
|
||||||
{
|
{
|
||||||
@@ -2971,6 +2991,8 @@ def instroke_chart_interactive(request, id=0):
|
|||||||
response = json.dumps({
|
response = json.dumps({
|
||||||
'script': script,
|
'script': script,
|
||||||
'div': div,
|
'div': div,
|
||||||
|
'ds': ds,
|
||||||
|
'dd': dd,
|
||||||
})
|
})
|
||||||
|
|
||||||
return HttpResponse(response, content_type='application/json')
|
return HttpResponse(response, content_type='application/json')
|
||||||
@@ -2989,6 +3011,8 @@ def instroke_chart_interactive(request, id=0):
|
|||||||
'the_div': div,
|
'the_div': div,
|
||||||
'spm_min': spm_min,
|
'spm_min': spm_min,
|
||||||
'spm_max': spm_max,
|
'spm_max': spm_max,
|
||||||
|
'ds': ds,
|
||||||
|
'dd': dd,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user