diff --git a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/histogram/HDRHistogramView.java b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/histogram/HDRHistogramView.java index 30f2c1e16..cb0efc029 100644 --- a/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/histogram/HDRHistogramView.java +++ b/application/org.openjdk.jmc.flightrecorder.ui/src/main/java/org/openjdk/jmc/flightrecorder/ui/views/histogram/HDRHistogramView.java @@ -269,7 +269,7 @@ private void updateHistogramChart() { // Get the maximum duration to set chart bounds IQuantity maxDuration = itemsWithDuration.getAggregate(JdkAggregators.LONGEST_EVENT); - if (maxDuration == null) { + if (maxDuration == null || maxDuration.clampedLongValueIn(UnitLookup.NANOSECOND) == 0L) { maxDuration = UnitLookup.MILLISECOND.quantity(100); } else { maxDuration = UnitLookup.MILLISECOND.quantity(maxDuration.doubleValueIn(UnitLookup.MILLISECOND) * 1.1);