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