Changeset 140 for trunk/pycha/pie.py
- Timestamp:
- 02/03/09 16:08:23 (3 years ago)
- Files:
-
- 1 modified
-
trunk/pycha/pie.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pycha/pie.py
r139 r140 1 # Copyright (c) 2007-2008by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>1 # Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 2 2 # 3 3 # This file is part of PyCha. … … 22 22 from pycha.chart import Chart, Option 23 23 from pycha.color import hex2rgb 24 24 25 25 26 class PieChart(Chart): … … 139 140 normalisedAngle = slice.getNormalisedAngle() 140 141 141 labelx = self.centerx + math.sin(normalisedAngle) * (self.radius + 10) 142 labely = self.centery - math.cos(normalisedAngle) * (self.radius + 10) 142 big_radius = self.radius + 10 143 labelx = self.centerx + math.sin(normalisedAngle) * big_radius 144 labely = self.centery - math.cos(normalisedAngle) * big_radius 143 145 144 146 label = tick[1] … … 168 170 169 171 class Slice(object): 172 170 173 def __init__(self, name, fraction, xval, yval, angle): 171 174 self.name = name
