working sliders on line collection (force curve)
This commit is contained in:
@@ -866,8 +866,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
|
|||||||
var multilines2 = sourcemultiline2.data
|
var multilines2 = sourcemultiline2.data
|
||||||
var plottype = plottype
|
var plottype = plottype
|
||||||
|
|
||||||
var multilinesx = multilines['xs']
|
var multilinesx = multilines2['x']
|
||||||
var multilinesy = multilines['ys']
|
var multilinesy = multilines2['y']
|
||||||
|
|
||||||
var x = data['x']
|
var x = data['x']
|
||||||
var y = data['y']
|
var y = data['y']
|
||||||
@@ -914,8 +914,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
|
|||||||
|
|
||||||
datapoints['peakforceangle'] = []
|
datapoints['peakforceangle'] = []
|
||||||
datapoints['peakforce'] = []
|
datapoints['peakforce'] = []
|
||||||
multilines['xs'] = []
|
multilines['x'] = []
|
||||||
multilines['ys'] = []
|
multilines['y'] = []
|
||||||
|
|
||||||
for (i=0; i<c.length; i++) {
|
for (i=0; i<c.length; i++) {
|
||||||
if (spm1[i]>=minspm && spm1[i]<=maxspm) {
|
if (spm1[i]>=minspm && spm1[i]<=maxspm) {
|
||||||
@@ -926,10 +926,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
|
|||||||
datapoints['peakforce'].push(peakforce[i])
|
datapoints['peakforce'].push(peakforce[i])
|
||||||
}
|
}
|
||||||
if (plottype=='line') {
|
if (plottype=='line') {
|
||||||
xs = [c[i],slip[i],peakforceangle[i],wash[i],finish[i]]
|
multilines['x'].push(multilinesx[i])
|
||||||
ys = [0,thresholdforce,peakforce[i],thresholdforce,finish[i]]
|
multilines['y'].push(multilinesy[i])
|
||||||
multilines['xs'].push(xs)
|
|
||||||
multilines['ys'].push(ys)
|
|
||||||
}
|
}
|
||||||
catchav += c[i]
|
catchav += c[i]
|
||||||
finishav += finish[i]
|
finishav += finish[i]
|
||||||
@@ -967,6 +965,10 @@ def interactive_forcecurve(theworkouts,workstrokesonly=True,plottype='scatter'):
|
|||||||
peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2)
|
peakflabel.text = 'Fpeak: '+peakforceav.toFixed(2)
|
||||||
peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2)
|
peakforceanglelabel.text = 'Peak angle: '+peakforceangleav.toFixed(2)
|
||||||
annolabel.text = annotation
|
annolabel.text = annotation
|
||||||
|
|
||||||
|
console.log(count);
|
||||||
|
console.log(multilines['x'].length);
|
||||||
|
console.log(multilines['y'].length);
|
||||||
|
|
||||||
// source.trigger('change');
|
// source.trigger('change');
|
||||||
source.change.emit();
|
source.change.emit();
|
||||||
|
|||||||
Reference in New Issue
Block a user