anchor.diff:    index_cache = [];
   
     var isFirst = true,
  +      start_found = false,
  +      end_found = false,
         isLast = false;
   
     for (var index in charts_data) {
  
positive.code:   set_chart_data();
    updateRangeSelector();
    updateUnits();
  }
negative.code: 
          }
        }
  
        dist += point.distance;
        elev += point.elevation_diff;
  