# HG changeset patch # User Ingo Weinzierl # Date 1277903142 0 # Node ID 7e085bfb107b35a271f727a60cf8d0f5931a5b29 # Parent e7efbded13670c56237f2239dcdab38245e9beba Bugfix: Histogram width results in an IllegalArgumentException (issue320). gnv-artifacts/trunk@1253 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r e7efbded1367 -r 7e085bfb107b gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Wed Jun 30 12:26:04 2010 +0000 +++ b/gnv-artifacts/ChangeLog Wed Jun 30 13:05:42 2010 +0000 @@ -4,6 +4,15 @@ * ChangeLog, Changes, NEWS: Summarized changes. +2010-06-30 Ingo Weinzierl + + Issue320 + + * src/main/java/de/intevation/gnv/chart/AdvancedHistogramDataset.java: The + minimum number of bins in an histogram is set to 1. If the user has chosen + a value for the class width that results in number < 1, the bin number is + set to 1. + 2010-06-29 Ingo Weinzierl * src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java: diff -r e7efbded1367 -r 7e085bfb107b gnv-artifacts/src/main/java/de/intevation/gnv/chart/AdvancedHistogramDataset.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/AdvancedHistogramDataset.java Wed Jun 30 12:26:04 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/AdvancedHistogramDataset.java Wed Jun 30 13:05:42 2010 +0000 @@ -153,8 +153,7 @@ } if (bins <= 0) { - throw new IllegalArgumentException( - "The 'bins' value must be at least 1."); + bins = 1; } // in this case, there is a number of bins given, so we need to