Directory of samples which mimic the standard Excel chart classes.
authorjohnprecedo
Mon, 17 Mar 2003 12:55:12 +0000
changeset 1859 89c74d68f1f5
parent 1858 42b778df7941
child 1860 aab133a1f878
Directory of samples which mimic the standard Excel chart classes. iInitial checkin - copied across from users/john/excel_samples.
reportlab/graphics/samples/__init__.py
reportlab/graphics/samples/clustered_bar.py
reportlab/graphics/samples/clustered_column.py
reportlab/graphics/samples/excelcolors.py
reportlab/graphics/samples/exploded_pie.py
reportlab/graphics/samples/filled_radar.py
reportlab/graphics/samples/radar.py
reportlab/graphics/samples/runall.py
reportlab/graphics/samples/simple_pie.py
reportlab/graphics/samples/stacked_bar.py
reportlab/graphics/samples/stacked_column.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/__init__.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,1 @@
+# $Header: /tmp/reportlab/reportlab/graphics/samples/__init__.py,v 1.1 2003/03/17 12:55:12 johnprecedo Exp $
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/clustered_bar.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,83 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from excelcolors import *
+from reportlab.graphics.charts.barcharts import HorizontalBarChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+
+class ClusteredBar(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,HorizontalBarChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 115
+		self.chart.height     = 80
+		self.chart.x          = 30
+		self.chart.y          = 40
+		self.chart.bars[0].fillColor = color01
+		self.chart.bars[1].fillColor = color02
+		self.chart.bars[2].fillColor = color03
+		self.chart.bars[3].fillColor = color04
+		self.chart.bars[4].fillColor = color05
+		self.chart.bars[5].fillColor = color06
+		self.chart.bars[6].fillColor = color07
+		self.chart.bars[7].fillColor = color08
+		self.chart.bars[8].fillColor = color09
+		self.chart.bars[9].fillColor = color10
+		self.chart.fillColor         = backgroundGrey
+		self.chart.barLabels.fontName              = 'Helvetica'
+		self.chart.valueAxis.labels.fontName       = 'Helvetica'
+		self.chart.valueAxis.labels.fontSize       = 6
+		self.chart.valueAxis.forceZero             = 1
+		self.chart.data             = [(100, 150, 180), (125, 180, 200)]
+		self.chart.groupSpacing     = 15
+		self.chart.valueAxis.avoidBoundFrac           = 1
+		self.chart.valueAxis.gridEnd                  = 80
+		self.chart.valueAxis.tickDown                 = 3
+		self.chart.valueAxis.visibleGrid              = 1
+		self.chart.categoryAxis.categoryNames         = ['North', 'South', 'Central']
+		self.chart.categoryAxis.tickLeft              = 3
+		self.chart.categoryAxis.labels.fontName       = 'Helvetica'
+		self.chart.categoryAxis.labels.fontSize       = 6
+		self.chart.categoryAxis.labels.dx             = -3
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self._add(self,Label(),name='XLabel',validate=None,desc="The label on the horizontal axis")
+		self.XLabel.fontName       = 'Helvetica'
+		self.XLabel.fontSize       = 7
+		self.XLabel.x              = 85
+		self.XLabel.y              = 10
+		self.XLabel.textAnchor     ='middle'
+		self.XLabel.maxWidth       = 100
+		self.XLabel.height         = 20
+		self.XLabel._text          = "X Axis"
+		self._add(self,Label(),name='YLabel',validate=None,desc="The label on the vertical axis")
+		self.YLabel.fontName       = 'Helvetica'
+		self.YLabel.fontSize       = 7
+		self.YLabel.x              = 12
+		self.YLabel.y              = 80
+		self.YLabel.angle          = 90
+		self.YLabel.textAnchor     ='middle'
+		self.YLabel.maxWidth       = 100
+		self.YLabel.height         = 20
+		self.YLabel._text          = "Y Axis"
+
+if __name__=="__main__": #NORUNTESTS
+	ClusteredBar().save(formats=['pdf'],outDir='.',fnRoot='clustered_bar')
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/clustered_column.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,82 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from excelcolors import *
+from reportlab.graphics.charts.barcharts import VerticalBarChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+
+class ClusteredColumn(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,VerticalBarChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 115
+		self.chart.height     = 80
+		self.chart.x          = 30
+		self.chart.y          = 40
+		self.chart.bars[0].fillColor = color01
+		self.chart.bars[1].fillColor = color02
+		self.chart.bars[2].fillColor = color03
+		self.chart.bars[3].fillColor = color04
+		self.chart.bars[4].fillColor = color05
+		self.chart.bars[5].fillColor = color06
+		self.chart.bars[6].fillColor = color07
+		self.chart.bars[7].fillColor = color08
+		self.chart.bars[8].fillColor = color09
+		self.chart.bars[9].fillColor = color10
+		self.chart.fillColor         = backgroundGrey
+		self.chart.barLabels.fontName              = 'Helvetica'
+		self.chart.valueAxis.labels.fontName       = 'Helvetica'
+		self.chart.valueAxis.labels.fontSize       = 7
+		self.chart.valueAxis.forceZero             = 1
+		self.chart.data             = [(100, 150, 180), (125, 180, 200)]
+		self.chart.groupSpacing     = 15
+		self.chart.valueAxis.avoidBoundFrac           = 1
+		self.chart.valueAxis.gridEnd                  = 115
+		self.chart.valueAxis.tickLeft                 = 3
+		self.chart.valueAxis.visibleGrid              = 1
+		self.chart.categoryAxis.categoryNames         = ['North', 'South', 'Central']
+		self.chart.categoryAxis.tickDown              = 3
+		self.chart.categoryAxis.labels.fontName       = 'Helvetica'
+		self.chart.categoryAxis.labels.fontSize       = 7
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth  = 180
+		self.Title.height    = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self._add(self,Label(),name='XLabel',validate=None,desc="The label on the horizontal axis")
+		self.XLabel.fontName       = 'Helvetica'
+		self.XLabel.fontSize       = 7
+		self.XLabel.x              = 85
+		self.XLabel.y              = 10
+		self.XLabel.textAnchor     ='middle'
+		self.XLabel.maxWidth       = 100
+		self.XLabel.height         = 20
+		self.XLabel._text           = "X Axis"
+		self._add(self,Label(),name='YLabel',validate=None,desc="The label on the vertical axis")
+		self.YLabel.fontName       = 'Helvetica'
+		self.YLabel.fontSize       = 7
+		self.YLabel.x              = 12
+		self.YLabel.y              = 80
+		self.YLabel.angle          = 90
+		self.YLabel.textAnchor     ='middle'
+		self.YLabel.maxWidth       = 100
+		self.YLabel.height         = 20
+		self.YLabel._text           = "Y Axis"
+
+if __name__=="__main__": #NORUNTESTS
+	ClusteredColumn().save(formats=['pdf'],outDir='.',fnRoot='clustered_column')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/excelcolors.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,45 @@
+# define standard colors to mimic those used by Microsoft Excel
+from reportlab.lib.colors import CMYKColor, PCMYKColor
+
+#colour names as comments at the end of each line are as a memory jogger ONLY
+#NOT HTML named colours!
+
+#Main colours as used for bars etc
+color01 = PCMYKColor(40,40,0,0)    # Lavender
+color02 = PCMYKColor(0,66,33,39)   # Maroon
+color03 = PCMYKColor(0,0,20,0)     # Yellow
+color04 = PCMYKColor(20,0,0,0)     # Cyan
+color05 = PCMYKColor(0,100,0,59)   # Purple
+color06 = PCMYKColor(0,49,49,0)    # Salmon
+color07 = PCMYKColor(100,49,0,19)  # Blue
+color08 = PCMYKColor(20,20,0,0)    # PaleLavender
+color09 = PCMYKColor(100,100,0,49) # NavyBlue
+color10 = PCMYKColor(0,100,0,0)    # Purple
+
+#Highlight colors - eg for the tops of bars
+color01Light = PCMYKColor(39,39,0,25)   # Light Lavender
+color02Light = PCMYKColor(0,66,33,54)   # Light Maroon
+color03Light = PCMYKColor(0,0,19,25)    # Light Yellow
+color04Light = PCMYKColor(19,0,0,25)    # Light Cyan
+color05Light = PCMYKColor(0,100,0,69)   # Light Purple
+color06Light = PCMYKColor(0,49,49,25)   # Light Salmon
+color07Light = PCMYKColor(100,49,0,39)  # Light Blue
+color08Light = PCMYKColor(19,19,0,25)   # Light PaleLavender
+color09Light = PCMYKColor(100,100,0,62) # Light NavyBlue
+color10Light = PCMYKColor(0,100,0,25)   # Light Purple
+
+#Lowlight colors - eg for the sides of bars
+color01Dark = PCMYKColor(39,39,0,49)   # Dark Lavender
+color02Dark = PCMYKColor(0,66,33,69)   # Dark Maroon
+color03Dark = PCMYKColor(0,0,20,49)    # Dark Yellow
+color04Dark = PCMYKColor(20,0,0,49)    # Dark Cyan
+color05Dark = PCMYKColor(0,100,0,80)   # Dark Purple
+color06Dark = PCMYKColor(0,50,50,49)   # Dark Salmon
+color07Dark = PCMYKColor(100,50,0,59)  # Dark Blue
+color08Dark = PCMYKColor(20,20,0,49)   # Dark PaleLavender
+color09Dark = PCMYKColor(100,100,0,79) # Dark NavyBlue
+color10Dark = PCMYKColor(0,100,0,49)   # Dark Purple
+
+#for standard grey backgrounds
+backgroundGrey = PCMYKColor(0,0,0,24)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/exploded_pie.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,64 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.piecharts import Pie
+from excelcolors import *
+from reportlab.graphics.widgets.grids import ShadedRect
+from reportlab.graphics.charts.legends import Legend
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+
+class ExplodedPie(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,Pie(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 100
+		self.chart.height     = 100
+		self.chart.x          = 25
+		self.chart.y          = 25
+		self.chart.slices[0].fillColor = color01
+		self.chart.slices[1].fillColor = color02
+		self.chart.slices[2].fillColor = color03
+		self.chart.slices[3].fillColor = color04
+		self.chart.slices[4].fillColor = color05
+		self.chart.slices[5].fillColor = color06
+		self.chart.slices[6].fillColor = color07
+		self.chart.slices[7].fillColor = color08
+		self.chart.slices[8].fillColor = color09
+		self.chart.slices[9].fillColor = color10
+		self.chart.data                = (100, 150, 180)
+		self.chart.startAngle          = -90
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'North'), (color02, 'South'), (color03, 'Central')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 160
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self.Legend.columnMaximum  = 10
+		self.chart.slices.strokeWidth  = 1
+		self.chart.slices.fontName     = 'Helvetica'
+		self.background                = ShadedRect()
+		self.background.fillColorStart = backgroundGrey
+		self.background.fillColorEnd   = backgroundGrey
+		self.background.numShades      = 1
+		self.background.strokeWidth    = 0.5
+		self.background.x              = 20
+		self.background.y              = 20
+		self.chart.slices.popout       = 5
+		self.background.height         = 110
+		self.background.width          = 110
+
+if __name__=="__main__": #NORUNTESTS
+	ExplodedPie().save(formats=['pdf'],outDir='.',fnRoot='exploded_pie')
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/filled_radar.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,53 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from reportlab.graphics.charts.spider import SpiderChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+from excelcolors import *
+
+class FilledRadarChart(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,SpiderChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 90
+		self.chart.height     = 90
+		self.chart.x          = 45
+		self.chart.y          = 25
+		self.chart.strands[0].fillColor  = color01
+		self.chart.strands[1].fillColor  = color02
+		self.chart.strands[2].fillColor  = color03
+		self.chart.strands[3].fillColor  = color04
+		self.chart.strands[4].fillColor  = color05
+		self.chart.strands[5].fillColor  = color06
+		self.chart.strands[6].fillColor  = color07
+		self.chart.strands[7].fillColor  = color08
+		self.chart.strands[8].fillColor  = color09
+		self.chart.strands[9].fillColor  = color10
+		self.chart.strands.fontName      = 'Helvetica'
+		self.chart.strands.fontSize      = 6
+		self.chart.fillColor             = backgroundGrey
+		self.chart.data                  = [(125, 180, 200), (100, 150, 180)]
+		self.chart.labels                = ['North', 'South', 'Central']
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+
+if __name__=="__main__": #NORUNTESTS
+	FilledRadarChart().save(formats=['pdf'],outDir='.',fnRoot='filled_radar')
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/radar.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,65 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from excelcolors import *
+from reportlab.graphics.charts.spider import SpiderChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+
+class RadarChart(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,SpiderChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 90
+		self.chart.height     = 90
+		self.chart.x          = 45
+		self.chart.y          = 25
+		self.chart.strands[0].strokeColor= color01
+		self.chart.strands[1].strokeColor= color02
+		self.chart.strands[2].strokeColor= color03
+		self.chart.strands[3].strokeColor= color04
+		self.chart.strands[4].strokeColor= color05
+		self.chart.strands[5].strokeColor= color06
+		self.chart.strands[6].strokeColor= color07
+		self.chart.strands[7].strokeColor= color08
+		self.chart.strands[8].strokeColor= color09
+		self.chart.strands[9].strokeColor= color10
+		self.chart.strands[0].fillColor  = None
+		self.chart.strands[1].fillColor  = None
+		self.chart.strands[2].fillColor  = None
+		self.chart.strands[3].fillColor  = None
+		self.chart.strands[4].fillColor  = None
+		self.chart.strands[5].fillColor  = None
+		self.chart.strands[6].fillColor  = None
+		self.chart.strands[7].fillColor  = None
+		self.chart.strands[8].fillColor  = None
+		self.chart.strands[9].fillColor  = None
+		self.chart.strands.strokeWidth   = 1
+		self.chart.strands.fontName      = 'Helvetica'
+		self.chart.strands.fontSize      = 6
+		self.chart.fillColor             = backgroundGrey
+		self.chart.data                  = [(125, 180, 200), (100, 150, 180)]
+		self.chart.labels                = ['North', 'South', 'Central']
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self.chart.strands.strokeWidth     = 1
+
+if __name__=="__main__": #NORUNTESTS
+	RadarChart().save(formats=['pdf'],outDir='.',fnRoot='radar')
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/runall.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,30 @@
+# runs all the GUIedit charts in this directory - 
+# makes a PDF sample for eaxh existing chart type
+
+if __name__ == "__main__":
+    def run():
+        import glob, string
+        def moduleClasses(mod):
+            import inspect, types
+            def P(obj, m=mod.__name__, CT=types.ClassType):
+                return (type(obj)==CT and obj.__module__==m)
+            try:
+                return inspect.getmembers(mod, P)[0][1]
+            except:
+                return None
+        def getclass(f):
+            return moduleClasses(__import__(f))
+
+        allfiles = glob.glob('*.py')
+        allfiles.sort()
+        for fn in allfiles:
+            f = string.split(fn, '.')[0]
+            c = getclass(f)
+            if c != None:
+                print c.__name__
+                try:
+                    c().save(formats=['pdf'],outDir='.',fnRoot=c.__name__)
+                except:
+                    print " COULDN'T CREATE '%s.pdf'!" % c.__name__
+
+    run()
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/simple_pie.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,60 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.piecharts import Pie
+from reportlab.graphics.widgets.grids import ShadedRect
+from reportlab.graphics.charts.legends import Legend
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+from excelcolors import *
+
+class SimplePie(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,Pie(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 100
+		self.chart.height     = 100
+		self.chart.x          = 25
+		self.chart.y          = 25
+		self.chart.slices[0].fillColor = color01
+		self.chart.slices[1].fillColor = color02
+		self.chart.slices[2].fillColor = color03
+		self.chart.slices[3].fillColor = color04
+		self.chart.slices[4].fillColor = color05
+		self.chart.slices[5].fillColor = color06
+		self.chart.slices[6].fillColor = color07
+		self.chart.slices[7].fillColor = color08
+		self.chart.slices[8].fillColor = color09
+		self.chart.slices[9].fillColor = color10
+		self.chart.data                = (100, 150, 180)
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'North'), (color02, 'South'),(color03, 'Central')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 160
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self.chart.slices.strokeWidth  = 1
+		self.chart.slices.fontName     = 'Helvetica'
+		self.background                = ShadedRect()
+		self.background.fillColorStart = backgroundGrey
+		self.background.fillColorEnd   = backgroundGrey
+		self.background.numShades      = 1
+		self.background.strokeWidth    = 0.5
+		self.background.x              = 25
+		self.background.y              = 25
+		self.Legend.columnMaximum  = 10
+
+if __name__=="__main__": #NORUNTESTS
+	SimplePie().save(formats=['pdf'],outDir='.',fnRoot=None)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/stacked_bar.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,84 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from reportlab.graphics.charts.barcharts import HorizontalBarChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+from excelcolors import *
+
+class StackedBar(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,HorizontalBarChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 115
+		self.chart.height     = 80
+		self.chart.x          = 30
+		self.chart.y          = 40
+		self.chart.bars[0].fillColor = color01
+		self.chart.bars[1].fillColor = color02
+		self.chart.bars[2].fillColor = color03
+		self.chart.bars[3].fillColor = color04
+		self.chart.bars[4].fillColor = color05
+		self.chart.bars[5].fillColor = color06
+		self.chart.bars[6].fillColor = color07
+		self.chart.bars[7].fillColor = color08
+		self.chart.bars[8].fillColor = color09
+		self.chart.bars[9].fillColor = color10
+		self.chart.fillColor         = backgroundGrey
+		self.chart.barLabels.fontName              = 'Helvetica'
+		self.chart.valueAxis.labels.fontName       = 'Helvetica'
+		self.chart.valueAxis.labels.fontSize       = 6
+		self.chart.valueAxis.forceZero             = 1
+		self.chart.data             = [(100, 150, 180), (125, 180, 200)]
+		self.chart.groupSpacing     = 15
+		self.chart.valueAxis.avoidBoundFrac           = 1
+		self.chart.valueAxis.gridEnd                  = 80
+		self.chart.valueAxis.tickDown                 = 3
+		self.chart.valueAxis.visibleGrid              = 1
+		self.chart.categoryAxis.categoryNames         = ['North', 'South', 'Central']
+		self.chart.categoryAxis.tickLeft              = 3
+		self.chart.categoryAxis.labels.fontName       = 'Helvetica'
+		self.chart.categoryAxis.labels.fontSize       = 6
+		self.chart.categoryAxis.labels.dx             = -3
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self._add(self,Label(),name='XLabel',validate=None,desc="The label on the horizontal axis")
+		self.XLabel.fontName       = 'Helvetica'
+		self.XLabel.fontSize       = 7
+		self.XLabel.x              = 85
+		self.XLabel.y              = 10
+		self.XLabel.textAnchor     ='middle'
+		self.XLabel.maxWidth       = 100
+		self.XLabel.height         = 20
+		self.XLabel._text           = "X Axis"
+		self._add(self,Label(),name='YLabel',validate=None,desc="The label on the vertical axis")
+		self.YLabel.fontName       = 'Helvetica'
+		self.YLabel.fontSize       = 7
+		self.YLabel.x              = 12
+		self.YLabel.y              = 80
+		self.YLabel.angle          = 90
+		self.YLabel.textAnchor     ='middle'
+		self.YLabel.maxWidth       = 100
+		self.YLabel.height         = 20
+		self.YLabel._text          = "Y Axis"
+		self.chart.categoryAxis.style='stacked'
+
+if __name__=="__main__": #NORUNTESTS
+	StackedBar().save(formats=['pdf'],outDir='.',fnRoot='stacked_bar')
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reportlab/graphics/samples/stacked_column.py	Mon Mar 17 12:55:12 2003 +0000
@@ -0,0 +1,83 @@
+#Autogenerated by ReportLab guiedit do not edit
+from reportlab.graphics.charts.legends import Legend
+from reportlab.graphics.charts.barcharts import VerticalBarChart
+from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
+from reportlab.graphics.charts.textlabels import Label
+from excelcolors import *
+
+class StackedColumn(_DrawingEditorMixin,Drawing):
+	def __init__(self,width=200,height=150,*args,**kw):
+		apply(Drawing.__init__,(self,width,height)+args,kw)
+		self._add(self,VerticalBarChart(),name='chart',validate=None,desc="The main chart")
+		self.chart.width      = 115
+		self.chart.height     = 80
+		self.chart.x          = 30
+		self.chart.y          = 40
+		self.chart.bars[0].fillColor = color01
+		self.chart.bars[1].fillColor = color02
+		self.chart.bars[2].fillColor = color03
+		self.chart.bars[3].fillColor = color04
+		self.chart.bars[4].fillColor = color05
+		self.chart.bars[5].fillColor = color06
+		self.chart.bars[6].fillColor = color07
+		self.chart.bars[7].fillColor = color08
+		self.chart.bars[8].fillColor = color09
+		self.chart.bars[9].fillColor = color10
+		self.chart.fillColor         = backgroundGrey
+		self.chart.barLabels.fontName              = 'Helvetica'
+		self.chart.valueAxis.labels.fontName       = 'Helvetica'
+		self.chart.valueAxis.labels.fontSize       = 7
+		self.chart.valueAxis.forceZero             = 1
+		self.chart.data             = [(100, 150, 180), (125, 180, 200)]
+		self.chart.groupSpacing     = 15
+		self.chart.valueAxis.avoidBoundFrac           = 1
+		self.chart.valueAxis.gridEnd                  = 115
+		self.chart.valueAxis.tickLeft                 = 3
+		self.chart.valueAxis.visibleGrid              = 1
+		self.chart.categoryAxis.categoryNames         = ['North', 'South', 'Central']
+		self.chart.categoryAxis.tickDown              = 3
+		self.chart.categoryAxis.labels.fontName       = 'Helvetica'
+		self.chart.categoryAxis.labels.fontSize       = 7
+		self._add(self,Label(),name='Title',validate=None,desc="The title at the top of the chart")
+		self.Title.fontName   = 'Helvetica-Bold'
+		self.Title.fontSize   = 7
+		self.Title.x          = 100
+		self.Title.y          = 135
+		self.Title._text      = 'Chart Title'
+		self.Title.maxWidth   = 180
+		self.Title.height     = 20
+		self.Title.textAnchor ='middle'
+		self._add(self,Legend(),name='Legend',validate=None,desc="The legend or key for the chart")
+		self.Legend.colorNamePairs = [(color01, 'Widgets'), (color02, 'Sprockets')]
+		self.Legend.fontName       = 'Helvetica'
+		self.Legend.fontSize       = 7
+		self.Legend.x              = 153
+		self.Legend.y              = 85
+		self.Legend.dxTextSpace    = 5
+		self.Legend.dy             = 5
+		self.Legend.dx             = 5
+		self.Legend.deltay         = 5
+		self.Legend.alignment      ='right'
+		self._add(self,Label(),name='XLabel',validate=None,desc="The label on the horizontal axis")
+		self.XLabel.fontName       = 'Helvetica'
+		self.XLabel.fontSize       = 7
+		self.XLabel.x              = 85
+		self.XLabel.y              = 10
+		self.XLabel.textAnchor     ='middle'
+		self.XLabel.maxWidth       = 100
+		self.XLabel.height         = 20
+		self.XLabel._text          = "X Axis"
+		self._add(self,Label(),name='YLabel',validate=None,desc="The label on the vertical axis")
+		self.YLabel.fontName       = 'Helvetica'
+		self.YLabel.fontSize       = 7
+		self.YLabel.x              = 12
+		self.YLabel.y              = 80
+		self.YLabel.angle          = 90
+		self.YLabel.textAnchor     ='middle'
+		self.YLabel.maxWidth       = 100
+		self.YLabel.height         = 20
+		self.YLabel._text          = "Y Axis"
+		self.chart.categoryAxis.style='stacked'
+
+if __name__=="__main__": #NORUNTESTS
+	StackedColumn().save(formats=['pdf'],outDir='.',fnRoot='stacked_column')