Warning: Can't synchronize with the repository (Unsupported version control system "svn". Check that the Python support libraries for "svn" are correctly installed.)

Ticket #20: range_fix.patch

File range_fix.patch, 1.2 kB (added by aprzywecki@…, 4 years ago)

fixes bar proportion for single bar with an xrange greater than 0

  • pycha/bar.py

     
    3939        uniqx = uniqueIndices(stores) 
    4040 
    4141        barWidth = 0 
    42         if len(uniqx) == 1: 
    43             xdelta = 1.0 
    44             barWidth = 1.0 * self.options.barWidthFillFraction 
    45             self.barWidthForSet = barWidth / len(stores) 
    46             self.barMargin = (1.0 - self.options.barWidthFillFraction) / 2 
    47         else: 
    48             xdelta = min([abs(uniqx[j] - uniqx[j-1]) 
    49                           for j in range(1, len(uniqx))]) 
    50             barWidth = xdelta * self.xscale * self.options.barWidthFillFraction 
    51             self.barWidthForSet = barWidth / len(stores) 
    52             self.barMargin = (xdelta * self.xscale 
    53                               * (1.0 - self.options.barWidthFillFraction) / 2) 
     42        xdelta = 1.0 
     43        barWidth = xdelta * self.xscale * self.options.barWidthFillFraction 
     44        self.barWidthForSet = barWidth / len(stores) 
     45        self.barMargin = (xdelta * self.xscale 
     46                          * (1.0 - self.options.barWidthFillFraction) / 2) 
    5447 
    5548        self.minxdelta = xdelta 
    5649        self.bars = []