diff --git a/rowers/dataprep.py b/rowers/dataprep.py
index 0d575328..b4acbd56 100644
--- a/rowers/dataprep.py
+++ b/rowers/dataprep.py
@@ -1421,7 +1421,7 @@ def add_efficiency(id=0):
# saves it to the stroke_data table in the database
# Takes a rowingdata object's DataFrame as input
def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
- empower=True,inboard=0.88):
+ empower=True,inboard=0.88,forceunit='lbs'):
if rowdatadf.empty:
return 0
@@ -1485,8 +1485,17 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
except TypeError:
drivespeed = 0.0*rowdatadf['TimeStamp (sec)']
+
drivespeed = drivespeed.fillna(value=0)
- driveenergy = drivelength*averageforce*lbstoN
+
+ try:
+ driveenergy = rowdatadf['driveenergy']
+ except KeyError:
+ if forceunit == 'lbs':
+ driveenergy = drivelength*averageforce*lbstoN
+ else:
+ drivenergy = drivelength*averageforce
+
distance = rowdatadf.ix[:,'cum_dist']
diff --git a/rowers/interactiveplots.py b/rowers/interactiveplots.py
index c71e3504..fb3d2ab1 100644
--- a/rowers/interactiveplots.py
+++ b/rowers/interactiveplots.py
@@ -1918,7 +1918,6 @@ def interactive_flex_chart2(id=0,promember=0,
yparam1 = 'None'
rowdata.dropna(axis=1,how='all',inplace=True)
- rowdata.dropna(axis=0,how='any',inplace=True)
# test if we have drive energy
nowork = 1
diff --git a/rowers/templates/histo.html b/rowers/templates/histo.html
index fe9b1024..11fd08eb 100644
--- a/rowers/templates/histo.html
+++ b/rowers/templates/histo.html
@@ -5,15 +5,57 @@
{% block title %}View Workout {% endblock %}
{% block content %}
+
+
-
+
+ // Hide the fields.
+ // Use JS to do this in case the user doesn't have JS
+ // enabled.
- {{ interactiveplot |safe }}
+ hidden.hide();
-
+
+
+
+
+{{ interactiveplot |safe }}
+
+