defaultStyles-->slices etc ReportLab_1_08
authorrgbecker
Tue, 19 Jun 2001 11:12:14 +0000
changeset 1021 2398e3e6b4f5
parent 1020 b3ab478c3037
child 1022 2a7cdced12e3
defaultStyles-->slices etc
docs/graphguide/ch2_graphics.py
--- a/docs/graphguide/ch2_graphics.py	Tue Jun 19 10:42:21 2001 +0000
+++ b/docs/graphguide/ch2_graphics.py	Tue Jun 19 11:12:14 2001 +0000
@@ -1,7 +1,7 @@
 #copyright ReportLab Inc. 2001
 #see license.txt for license details
 #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/docs/graphguide/ch2_graphics.py?cvsroot=reportlab
-#$Header: /tmp/reportlab/docs/graphguide/Attic/ch2_graphics.py,v 1.22 2001/06/19 10:42:21 rgbecker Exp $
+#$Header: /tmp/reportlab/docs/graphguide/Attic/ch2_graphics.py,v 1.23 2001/06/19 11:12:14 rgbecker Exp $
 
 from gengraphguide import *
 
@@ -1007,7 +1007,7 @@
 pc.x = 25
 pc.y = 50
 pc.data = [10,20,30,40,50,60]
-pc.defaultStyles[0].popout = 5
+pc.slices[0].popout = 5
 d.add(pc, 'pie1')
 pc2 = Pie()
 pc2.x = 150
@@ -1043,7 +1043,7 @@
 pc.x = 25
 pc.y = 50
 pc.data = [10,20,30,40,50,60]
-pc.defaultStyles[0].popout = 5
+pc.slices[0].popout = 5
 d.add(pc, 'pie1')
 pc2 = Pie()
 pc2.x = 150
@@ -1056,10 +1056,10 @@
 pc3.y = 50
 pc3.data = [10,20,30,40,50,60]
 pc3.labels = ['a','b','c','d','e','f']
-pc3.defaultStyles.labelRadius = 0.65
-pc3.defaultStyles.fontName = "Helvetica-Bold"
-pc3.defaultStyles.fontSize = 16
-pc3.defaultStyles.fontColor = colors.yellow
+pc3.slices.labelRadius = 0.65
+pc3.slices.fontName = "Helvetica-Bold"
+pc3.slices.fontSize = 16
+pc3.slices.fontColor = colors.yellow
 d.add(pc3, 'pie3')
 
 draw(d, 'A sample Pie')
@@ -1115,16 +1115,16 @@
 pc.y = 50
 pc.data = [10,20,30,40,50,60]
 pc.labels = ['a','b','c','d','e','f']
-pc.defaultStyles.strokeWidth=0.5
-pc.defaultStyles[3].popout = 20
-pc.defaultStyles[3].strokeWidth = 2
-pc.defaultStyles[3].strokeDashArray = [2,2]
-pc.defaultStyles[3].labelRadius = 1.75
-pc.defaultStyles[3].fontColor = colors.red
+pc.slices.strokeWidth=0.5
+pc.slices[3].popout = 20
+pc.slices[3].strokeWidth = 2
+pc.slices[3].strokeDashArray = [2,2]
+pc.slices[3].labelRadius = 1.75
+pc.slices[3].fontColor = colors.red
 d.add(pc, '')
 """)
  
-disc("""<para lindent=+36>pc.defaultStyles[3] actually lazily creates a little object which holds 
+disc("""<para lindent=+36>pc.slices[3] actually lazily creates a little object which holds 
        information about the slice in question; this will be used to format a 
        fourth slice at draw-time if there is one.""")
 
@@ -1795,12 +1795,12 @@
 pc.data = [10,20,30,40,50,60]
 pc.labels = ['a','b','c','d','e','f']
 
-pc.defaultStyles.strokeWidth=0.5
-pc.defaultStyles[3].popout = 10
-pc.defaultStyles[3].strokeWidth = 2
-pc.defaultStyles[3].strokeDashArray = [2,2]
-pc.defaultStyles[3].labelRadius = 1.75
-pc.defaultStyles[3].fontColor = colors.red
+pc.slices.strokeWidth=0.5
+pc.slices[3].popout = 10
+pc.slices[3].strokeWidth = 2
+pc.slices[3].strokeDashArray = [2,2]
+pc.slices[3].labelRadius = 1.75
+pc.slices[3].fontColor = colors.red
 
 d.add(pc)
 """)
@@ -1817,12 +1817,12 @@
 pc.data = [10,20,30,40,50,60]
 pc.labels = ['a','b','c','d','e','f']
 
-pc.defaultStyles.strokeWidth=0.5
-pc.defaultStyles[3].popout = 10
-pc.defaultStyles[3].strokeWidth = 2
-pc.defaultStyles[3].strokeDashArray = [2,2]
-pc.defaultStyles[3].labelRadius = 1.75
-pc.defaultStyles[3].fontColor = colors.red
+pc.slices.strokeWidth=0.5
+pc.slices[3].popout = 10
+pc.slices[3].strokeWidth = 2
+pc.slices[3].strokeDashArray = [2,2]
+pc.slices[3].labelRadius = 1.75
+pc.slices[3].fontColor = colors.red
 
 d.add(pc)