changeset 1114:7e085bfb107b

Bugfix: Histogram width results in an IllegalArgumentException (issue320). gnv-artifacts/trunk@1253 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 30 Jun 2010 13:05:42 +0000
parents e7efbded1367
children f953c9a559d8
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/chart/AdvancedHistogramDataset.java
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 <ingo.weinzierl@intevation.de>
+
+	  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 <ingo.weinzierl@intevation.de>
 
 	* src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.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

http://dive4elements.wald.intevation.org