Changeset 140 for trunk/pycha/pie.py

Show
Ignore:
Timestamp:
02/03/09 16:08:23 (3 years ago)
Author:
lgs
Message:

Change the copyright range and make all code pep8 compatible

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pycha/pie.py

    r139 r140  
    1 # Copyright (c) 2007-2008 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
     1# Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
    22# 
    33# This file is part of PyCha. 
     
    2222from pycha.chart import Chart, Option 
    2323from pycha.color import hex2rgb 
     24 
    2425 
    2526class PieChart(Chart): 
     
    139140            normalisedAngle = slice.getNormalisedAngle() 
    140141 
    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 
    143145 
    144146            label = tick[1] 
     
    168170 
    169171class Slice(object): 
     172 
    170173    def __init__(self, name, fraction, xval, yval, angle): 
    171174        self.name = name