code: private static Double translateMarkerToRange(double size, Double min, Double max, Double value) {
      if (value != null && min != null && max != null) {
        return (size / (max - min)) * (value - min);
      }
      
      return value;
    }
docs: Translates marker value to be correct in given range
  
  @param size size of the range
  @param min min value
  @param max max value
  @param value original value
  @return translated value