fixing filtering
This commit is contained in:
@@ -1802,7 +1802,7 @@ def interactive_flexchart_stacked(id, r, xparam='time',
|
||||
'metrics': metrics_list,
|
||||
}
|
||||
|
||||
script, div = get_chart("/stacked", chart_data, debug=False)
|
||||
script, div = get_chart("/stacked", chart_data, debug=True)
|
||||
|
||||
return script, div
|
||||
|
||||
@@ -2129,16 +2129,20 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
|
||||
compute = True
|
||||
doclean = True
|
||||
|
||||
driveenergy = False
|
||||
if 'driveenergy' in columns:
|
||||
driveenergy = True
|
||||
|
||||
|
||||
datadf = pl.DataFrame()
|
||||
if promember:
|
||||
datadf = dataprep.read_data(columns, ids=ids, doclean=doclean,
|
||||
compute=compute,
|
||||
compute=compute, driveenergy=driveenergy,
|
||||
workstrokesonly=workstrokesonly, for_chart=True,
|
||||
startenddict=startenddict)
|
||||
else:
|
||||
datadf = dataprep.read_data(columns_basic, ids=ids, doclean=doclean,
|
||||
compute=compute,
|
||||
compute=compute, driveenergy = driveenergy,
|
||||
workstrokesonly=workstrokesonly, for_chart=True,
|
||||
startenddict=startenddict)
|
||||
|
||||
@@ -2165,10 +2169,10 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
|
||||
|
||||
if (xparam == 'time'):
|
||||
datadf = datadf.with_columns((pl.col(xparam)-datadf[0,xparam]).alias(xparam))
|
||||
|
||||
|
||||
data_dict = datadf.to_dicts()
|
||||
|
||||
metrics_list = [{'name': name, 'rowingmetrics':d } for name, d in metrics.rowingmetrics]
|
||||
metrics_list = [{'name': name, 'rowingmetrics':{k: v for k, v in d.items() if k != 'numtype_pl'} } for name, d in metrics.rowingmetrics]
|
||||
|
||||
try:
|
||||
workoutsdict = [{'id': id, 'label': labeldict[id]} for id in ids]
|
||||
@@ -2185,6 +2189,7 @@ def interactive_multiple_compare_chart(ids, xparam, yparam, plottype='line',
|
||||
'workouts': workoutsdict,
|
||||
}
|
||||
|
||||
|
||||
script, div = get_chart("/compare", chart_data, debug=False)
|
||||
return script, div
|
||||
|
||||
|
||||
Reference in New Issue
Block a user