anchor.diff:  
           }
         }
  -
  -      isLast = false;
   
         dist += point.distance;
         elev += point.elevation_diff;
  
positive.code:   set_chart_data();
    updateRangeSelector();
    updateUnits();
  }
negative.code:       max_gr = max_gr == 0 || max_gr == null || max_gr < point.glrat ? point.glrat : max_gr;
      }
  
      if (end_found && elev_data.length > 0) {
        if (current_point.elevation <= min_val && charts_data.hasOwnProperty(index - 1)) {
  
          point = clone(current_point);
  