[Schmitzm-commits] r280 - in trunk: doc src/schmitzm/jfree/chart/style

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Aug 1 22:58:26 CEST 2009


Author: mojays
Date: 2009-08-01 22:58:25 +0200 (Sat, 01 Aug 2009)
New Revision: 280

Modified:
   trunk/doc/Chart style XML structure.pdf
   trunk/src/schmitzm/jfree/chart/style/ChartAxisStyle.java
Log:
suppress empty unit in axis label
Chart style XML structure >> v1.4


Modified: trunk/doc/Chart style XML structure.pdf
===================================================================
(Binary files differ)

Modified: trunk/src/schmitzm/jfree/chart/style/ChartAxisStyle.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartAxisStyle.java	2009-08-01 20:48:15 UTC (rev 279)
+++ trunk/src/schmitzm/jfree/chart/style/ChartAxisStyle.java	2009-08-01 20:58:25 UTC (rev 280)
@@ -177,9 +177,10 @@
     }
 
     // If unit is set, add it to axis title
-    String axisLabel = getLabel();
-    if ( getUnitString() != null )
-      axisLabel += " ["+getUnitString().trim()+"]";
+    String axisLabel  = getLabel();
+    String unitString = getUnitString(); 
+    if ( unitString != null && !"".equals(unitString.trim()) )
+      axisLabel += " ["+unitString.trim()+"]";
     
     // Apply common attributes
     axis.setLabel( axisLabel );



More information about the Schmitzm-commits mailing list