Changeset 140 for trunk/pycha/line.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/line.py

    r109 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. 
     
    1818from pycha.chart import Chart 
    1919from pycha.color import hex2rgb 
     20 
    2021 
    2122class LineChart(Chart): 
     
    4142    def _renderChart(self, cx): 
    4243        """Renders a line chart""" 
     44 
    4345        def preparePath(storeName): 
    4446            cx.new_path() 
     
    4850                # Go to the (0,0) coordinate to start drawing the area 
    4951                #cx.move_to(self.area.x, self.area.y + self.area.h) 
    50                 cx.move_to(self.area.x, 
    51                            self.area.y + (1.0 - self.area.origin) * self.area.h) 
     52                offset = (1.0 - self.area.origin) * self.area.h 
     53                cx.move_to(self.area.x, self.area.y + offset) 
    5254 
    5355            for point in self.points: 
     
    7981        cx.set_line_width(self.options.stroke.width) 
    8082        if self.options.shouldFill: 
     83 
    8184            def drawLine(storeName): 
    8285                if self.options.stroke.shadow: 
     
    109112        cx.restore() 
    110113 
     114 
    111115class Point(object): 
     116 
    112117    def __init__(self, x, y, xval, yval, name): 
    113118        self.x, self.y = x, y