fix bug in Pie3d reported by Eldon Ziegler <eldonz@atlanticdb.com>
authorrobin
Wed, 30 Oct 2019 15:23:59 +0000
changeset 4552 87794930cfad
parent 4551 d357e2acc856
child 4553 11f484137dca
fix bug in Pie3d reported by Eldon Ziegler <eldonz@atlanticdb.com>
src/reportlab/graphics/charts/piecharts.py
--- a/src/reportlab/graphics/charts/piecharts.py	Thu Oct 24 16:07:15 2019 +0100
+++ b/src/reportlab/graphics/charts/piecharts.py	Wed Oct 30 15:23:59 2019 +0000
@@ -1171,10 +1171,14 @@
 
     def __init__(self):
         Pie.__init__(self)
+        self.slices = TypedPropertyCollection(Wedge3dProperties)
+        self.slices[0].fillColor = colors.darkcyan
+        self.slices[1].fillColor = colors.blueviolet
+        self.slices[2].fillColor = colors.blue
+        self.slices[3].fillColor = colors.cyan
         self.slices[4].fillColor = colors.azure
         self.slices[5].fillColor = colors.crimson
         self.slices[6].fillColor = colors.darkviolet
-        self.slices = TypedPropertyCollection(Wedge3dProperties)
         self.xradius = self.yradius = None
         self.width = 300
         self.height = 200
@@ -1311,7 +1315,7 @@
 
         S.sort(key=_keyS3D)
         if checkLabelOverlap and L:
-            fixLabelOverlaps(L,sideLabels)
+            fixLabelOverlaps(L,self.sideLabels)
         for x in ([s[1] for s in S]+T+L):
             g.add(x)
         return g