Source:
protected static Format getContinuousAxisFormatter(List<LamiTableEntryAspect> axisAspects, List<LamiTableEntry> entries , @Nullable LamiGraphRange internalRange, @Nullable LamiGraphRange externalRange) { Format formatter = DECIMAL_FORMATTER; if (areAspectsTimeStamp(axisAspects)) { BigDecimal max = new BigDecimal(Long.MIN_VALUE); BigDecimal min = new BigDecimal(Long.MAX_VALUE); for (LamiTableEntry entry : entries) { for (LamiTableEntryAspect aspect : axisAspects) { @Nullable Number number = aspect.resolveNumber(entry); if (number != null) { BigDecimal current = new BigDecimal(number.toString()); max = current.compareTo(max) == 1 ? current : max; min = current.compareTo(min) == -1 ? current : min; } } } long duration = max.subtract(min).longValue(); if (duration > TimeUnit.DAYS.toNanos(1)) { formatter = DAYS_FORMATTER; } else if (duration > TimeUnit.HOURS.toNanos(1)) { formatter = HOURS_FORMATTER; } else if (duration > TimeUnit.MINUTES.toNanos(1)) { formatter = MINUTES_FORMATTER; } else if (duration > TimeUnit.SECONDS.toNanos(15)) { formatter = SECONDS_FORMATTER; } else { formatter = MILLISECONDS_FORMATTER; } ((LamiTimeStampFormat)formatter).setInternalRange(internalRange); ((LamiTimeStampFormat)formatter).setExternalRange(externalRange); } else if (areAspectsTimeDuration(axisAspects)) { formatter = NANO_TO_SECS_FORMATTER; ((LamiDecimalUnitFormat)formatter).setInternalRange(internalRange); ((LamiDecimalUnitFormat)formatter).setExternalRange(externalRange); } else { formatter = DECIMAL_FORMATTER; ((LamiDecimalUnitFormat)formatter).setInternalRange(internalRange); ((LamiDecimalUnitFormat)formatter).setExternalRange(externalRange); } return formatter; }

Target:
protected static Format getContinuousAxisFormatter(List<LamiTableEntryAspect> axisAspects, List<LamiTableEntry> entries , @Nullable LamiGraphRange internalRange, @Nullable LamiGraphRange externalRange) { Format formatter = DECIMAL_FORMATTER; if (areAspectsTimeStamp(axisAspects)) { BigDecimal max = new BigDecimal(Long.MIN_VALUE); BigDecimal min = new BigDecimal(Long.MAX_VALUE); for (LamiTableEntry entry : entries) { for (LamiTableEntryAspect aspect : axisAspects) { @Nullable Number number = aspect.resolveNumber(entry); if (number != null) { BigDecimal current = new BigDecimal(number.toString()); max = current.max(max); min = current.min(min); } } } long duration = max.subtract(min).longValue(); if (duration > TimeUnit.DAYS.toNanos(1)) { formatter = DAYS_FORMATTER; } else if (duration > TimeUnit.HOURS.toNanos(1)) { formatter = HOURS_FORMATTER; } else if (duration > TimeUnit.MINUTES.toNanos(1)) { formatter = MINUTES_FORMATTER; } else if (duration > TimeUnit.SECONDS.toNanos(15)) { formatter = SECONDS_FORMATTER; } else { formatter = MILLISECONDS_FORMATTER; } ((LamiTimeStampFormat)formatter).setInternalRange(internalRange); ((LamiTimeStampFormat)formatter).setExternalRange(externalRange); } else if (areAspectsTimeDuration(axisAspects)) { formatter = NANO_TO_SECS_FORMATTER; ((LamiDecimalUnitFormat)formatter).setInternalRange(internalRange); ((LamiDecimalUnitFormat)formatter).setExternalRange(externalRange); } else { formatter = DECIMAL_FORMATTER; ((LamiDecimalUnitFormat)formatter).setInternalRange(internalRange); ((LamiDecimalUnitFormat)formatter).setExternalRange(externalRange); } return formatter; }