anchor.diff:    </script>
     <div id="chart3"></div>
   <%end%>
  -<%if @sleep != nil%>
  +
  +<%if @sleep and  @sleep != [] %>
     <legend>Sleep Measurements</legend>
     <script type="text/javascript">
     $(document).ready(function(){
  
positive.code:   <script class="include" language="javascript" type="text/javascript" src="/javascripts/jqplot.cursor.min.js"></script>
    <script class="include" language="javascript" type="text/javascript" src="/javascripts/jqplot.barRenderer.min.js"></script>
  
  <%if @activity != nil%>
    <legend>Activity Measurements</legend>
    <script type="text/javascript">
    $(document).ready(function(){
  
negative.code:   <div id="chart2"></div>
  <%end%>
  
  <%if @body and @body != [] %>
    <legend>Body Measurements</legend>
    <script type="text/javascript">
    $(document).ready(function(){
  