def finalize (self):
        radius = min (self.width, self.height) / 2.0 - 10.0
        x = self.x + self.width / 2.0
        y = self.y + self.height / 2.0
        total = sum (self.values)
        data = zip (self.values, self.names)
        data.sort ()
        current = pi / 2.0
        for value, name in data:
            rad = (value / total) * (2 * pi)
            s = Sector (radius, current, rad, x = x, y = y)
            s.xml ['name'] = name
            s.style.fill = 'red'
            s.style.strokeWidth = .5
            s.style.strokeColor = 'black'
            self.draw (s)
            current += rad
dataset/ETHPy150Open dotskapes/dotSkapes/modules/savage/graph/canvas.py/PieCanvas.finalize/original