Private
Public Access
1
0

next version interactive plot

This commit is contained in:
2024-04-03 22:16:32 +02:00
parent 18e779dac8
commit 9bc107f427
5 changed files with 37 additions and 27 deletions

View File

@@ -521,11 +521,7 @@ def interactive_activitychart2(workouts, startdate, enddate, stack='type',
return script, div
def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter',
spm_min=15, spm_max=45,
notes='',
dist_min=0,dist_max=0,
work_min=0,work_max=1500):
def interactive_forcecurve(theworkouts):
TOOLS = 'save,pan,box_zoom,wheel_zoom,reset,tap,hover,crosshair'
ids = [int(w.id) for w in theworkouts]
@@ -537,19 +533,11 @@ def interactive_forcecurve(theworkouts, workstrokesonly=True, plottype='scatter'
'workoutstate', 'driveenergy', 'cumdist']
rowdata = dataprep.getsmallrowdata_db(columns, ids=ids,
workstrokesonly=workstrokesonly)
workstrokesonly=False)
rowdata.dropna(axis=1, how='all', inplace=True)
rowdata.dropna(axis=0, how='any', inplace=True)
workoutstatesrest = [3]
if workstrokesonly:
try:
rowdata = rowdata[~rowdata['workoutstate'].isin(workoutstatesrest)]
except KeyError: # pragma: no cover
pass
if rowdata.empty:
return "", "No Valid Data Available", "", ""