anchor.diff:      var current_point = charts_data[index];
       var point = {};
   
  -    isLast = true;
  -
  -    if (current_point.elevation <= max_val && current_point.elevation >= min_val) {
  +    start_found = start_found || current_point.elevation <= max_val; 
  +    end_found = end_found || current_point.elevation < min_val;
  +
  +    if (start_found && !end_found)  {
   
         point = clone(current_point);
   
  
positive.code:       max_gr = max_gr == 0 || max_gr == null || max_gr < point.glrat ? point.glrat : max_gr;
      }
  
      if (isLast && elev_data.length > 0) {
        if (current_point.elevation <= min_val && charts_data.hasOwnProperty(index - 1)) {
  
          point = clone(current_point);
  
negative.code:   set_chart_data();
    updateRangeSelector();
    updateUnits();
  }
  