code: function (xData, yData, min, max) {
  		var dataLength = xData.length,
  			cropStart = 0,
  			cropEnd = dataLength,
  			cropShoulder = pick(this.cropShoulder, 1), // line-type series need one point outside
  			i;
  
  		// iterate up to find slice start
  		for (i = 0; i < dataLength; i++) {
  			if (xData[i] >= min) {
  				cropStart = mathMax(0, i - cropShoulder);
  				break;
  			}
  		}
  
  		// proceed to find slice end
  		for (; i < dataLength; i++) {
  			if (xData[i] > max) {
  				cropEnd = i + cropShoulder;
  				break;
  			}
  		}
  
  		return {
  			xData: xData.slice(cropStart, cropEnd),
  			yData: yData.slice(cropStart, cropEnd),
  			start: cropStart,
  			end: cropEnd
  		};
  	}
docs: Iterate over xData and crop values between min and max. Returns object containing crop start/end
  cropped xData with corresponding part of yData, dataMin and dataMax within the cropped range