allow for zero spacing case py33
authorrobin
Tue, 21 May 2013 11:17:03 +0100
branchpy33
changeset 3740 9f4b1ba103f7
parent 3739 970f6cb12b90
child 3741 0cadc486be4a
child 3742 73fc407f4d7a
allow for zero spacing case (grafted from 953a2d87274ac49110945c8b21dca81e71e70887)
src/reportlab/graphics/charts/barcharts.py
--- a/src/reportlab/graphics/charts/barcharts.py	Wed May 08 15:41:13 2013 +0100
+++ b/src/reportlab/graphics/charts/barcharts.py	Tue May 21 11:17:03 2013 +0100
@@ -332,7 +332,7 @@
             fB = fS = (aW-wG)/(wB+wS)
         elif useAbsolute==3: #groupspacing & barwidth are fixed
             fB = fG = 1.0
-            fS = (aW-wG-wB)/wS
+            fS = (aW-wG-wB)/wS if wS else 0
         elif useAbsolute==4: #barspacing is fixed
             fS=1.0
             fG = fB = (aW-wS)/(wG+wB)