Commits

Robin Becker  committed d3f1be5

axes.py: fix bug in tick label positioning

  • Participants
  • Parent commits 1b0c70e

Comments (0)

Files changed (2)

File src/reportlab/graphics/charts/axes.py

                     label = self.labels[label]
                 else:
                     label = self.labels[i]
-                dy = label.dy
                 if pmv:
+                    _dy = label.dy
                     v = label._pmv = pmv[ic]
-                    if v<0: dy = -2*dy
+                    if v<0: _dy *= -2
+                else:
+                    _dy = 0
                 lpf = label.labelPosFrac
                 x = _x + (i+lpf) * barWidth
-                label.setOrigin(x, _y+dy)
+                label.setOrigin(x,_y+_dy)
                 label.setText(categoryNames[ic] or '')
                 g.add(label)
 
                     label = self.labels[i]
                 lpf = label.labelPosFrac
                 y = _y + (i+lpf) * barWidth
-                dx = label.dx
                 if pmv:
+                    _dx = label.dx
                     v = label._pmv = pmv[ic]
-                    if v<0: dx = -2*dx
-                label.setOrigin(_x+dx, y)
+                    if v<0: _dx *= -2
+                else:
+                    _dx = 0
+                label.setOrigin(_x+_dx, y)
                 label.setText(categoryNames[ic] or '')
                 g.add(label)
         return g

File src/reportlab/rl_config.py

                 '%(REPORTLAB_DIR)s/../fonts',           #special
                 '%(REPORTLAB_DIR)s/../../fonts',        #special
                 '%(HOME)s/fonts',                       #special
+                '/code/fid-sfr/fonts',
                  )
 
 # places to look for TT Font information
                 '/Library/Fonts',
                 '/Network/Library/Fonts',
                 '/System/Library/Fonts',
-                
+                '/code/fid-sfr/fonts',
                 )
 
 # places to look for CMap files - should ideally merge with above