diff -x '*.orig' -r -u moin-1.9.1-orig/MoinMoin/stats/hitcounts.py moin-1.9.1/MoinMoin/stats/hitcounts.py
--- moin-1.9.1-orig/MoinMoin/stats/hitcounts.py	2010-01-18 13:49:33.000000000 +0100
+++ moin-1.9.1/MoinMoin/stats/hitcounts.py	2010-02-14 17:24:28.000000000 +0100
@@ -192,7 +192,7 @@
 
 def draw(pagename, request):
     import shutil, cStringIO
-    from MoinMoin.stats.chart import Chart, ChartData, Color
+    import gdchart
 
     _ = request.getText
 
@@ -217,9 +217,12 @@
 
     # create image
     image = cStringIO.StringIO()
-    c = Chart()
-    c.addData(ChartData(views, color='green'))
-    c.addData(ChartData(edits, color='red'))
+    c = gdchart.Line()
+    c.bg_color= 0xffffff
+    c.line_color = 0x000000
+
+    c.setData((views),(edits))
+    c.ext_color=['green']*len(views) + ['red']*len(edits)
     chart_title = ''
     if request.cfg.sitename:
         chart_title = "%s: " % request.cfg.sitename
@@ -229,26 +232,24 @@
             'chart_title': chart_title,
             'filterpage': filterpage,
         }
-    chart_title = "%s\n%sx%d" % (chart_title, _("green=view\nred=edit"), scalefactor)
-    c.option(
-        title=chart_title.encode('iso-8859-1', 'replace'), # gdchart can't do utf-8
-        xtitle=(_('date') + ' (Server)').encode('iso-8859-1', 'replace'),
-        ytitle=_('# of hits').encode('iso-8859-1', 'replace'),
-        title_font=c.GDC_GIANT,
-        #thumblabel = 'THUMB', thumbnail = 1, thumbval = 10,
-        #ytitle_color = Color('green'),
-        #yaxis2 = 1,
-        #ytitle2 = '# of edits',
-        #ytitle2_color = Color('red'),
-        #ylabel2_color = Color('black'),
-        #interpolations = 0,
-        threed_depth=1.0,
-        requested_yinterval=1.0,
-        stack_type=c.GDC_STACK_BESIDE
-    )
-    c.draw(c.GDC_LINE,
-        (request.cfg.chart_options['width'], request.cfg.chart_options['height']),
-        image, days)
+    chart_title = "%s\n%s x %d" % (chart_title, _("green=view\nred=edit"), scalefactor)
+    c.title=chart_title.encode('iso-8859-1', 'replace') # gdchart can't do utf-8
+    c.xtitle=(_('date') + ' (Server)').encode('iso-8859-1', 'replace')
+    c.ytitle=_('# of hits').encode('iso-8859-1', 'replace')
+    c.title_font_size='GIANT'
+    c.threeD_depth=1.0
+    c.requested_yinterval=1.0
+    c.stack_type='BESIDE'
+    c.width=request.cfg.chart_options['width']
+    c.height=request.cfg.chart_options['height']
+    c.setLabels(days)
+
+    import tempfile
+    f = tempfile.NamedTemporaryFile(suffix=".gif")
+    c.draw(f.file)
+    f.file.seek(0)
+    image.write(f.file.read())
+    f.close()
 
     request.content_type = 'image/gif'
     request.content_length = len(image.getvalue())
diff -x '*.orig' -r -u moin-1.9.1-orig/MoinMoin/stats/pagesize.py moin-1.9.1/MoinMoin/stats/pagesize.py
--- moin-1.9.1-orig/MoinMoin/stats/pagesize.py	2010-01-18 13:49:33.000000000 +0100
+++ moin-1.9.1/MoinMoin/stats/pagesize.py	2010-02-14 17:24:28.000000000 +0100
@@ -51,10 +51,10 @@
 
 def draw(pagename, request):
     import bisect, shutil, cStringIO
-    from MoinMoin.stats.chart import Chart, ChartData, Color
+    import gdchart
+    from MoinMoin.util.web import Color
 
     _ = request.getText
-    style = Chart.GDC_3DBAR
 
     # get data
     pages = request.rootpage.getPageDict()
@@ -72,11 +72,11 @@
     if upper_bound >= 65536:
         bounds.extend([s*65536 for s in range(2, 9)])
 
-    data = [None] * len(bounds)
+    data = [0] * len(bounds)
     for size, name in sizes:
         idx = bisect.bisect(bounds, size)
         ##idx = int((size / upper_bound) * classes)
-        data[idx] = (data[idx] or 0) + 1
+        data[idx] = data[idx] + 1
 
     labels = ["%d" % b for b in bounds]
 
@@ -87,31 +87,35 @@
 
     # create image
     image = cStringIO.StringIO()
-    c = Chart()
-    ##c.addData(ChartData(data, 'magenta'))
-    c.addData(ChartData(_slice(data, 0, 7), 'blue'))
-    if upper_bound >= 1024:
-        c.addData(ChartData(_slice(data, 7, 14), 'green'))
-    if upper_bound >= 8192:
-        c.addData(ChartData(_slice(data, 14, 21), 'red'))
-    if upper_bound >= 65536:
-        c.addData(ChartData(_slice(data, 21, 28), 'magenta'))
+    c = gdchart.Bar3D()
+    c.bg_color= 0xffffff
+    c.line_color = 0x000000
+
+    c.setData(data)
+    c.ext_color= []
+    for x in ['blue', 'green', 'red', 'magenta']:
+        c.ext_color = c.ext_color + [ Color(x) ] * 8
     title = ''
     if request.cfg.sitename: title = "%s: " % request.cfg.sitename
-    title = title + _('Page Size Distribution')
-    c.option(
-        annotation=(bisect.bisect(bounds, upper_bound), Color('black'), "%d %s" % sizes[-1]),
-        title=title.encode('iso-8859-1', 'replace'), # gdchart can't do utf-8
-        xtitle=_('page size upper bound [bytes]').encode('iso-8859-1', 'replace'),
-        ytitle=_('# of pages of this size').encode('iso-8859-1', 'replace'),
-        title_font=c.GDC_GIANT,
-        threed_depth=2.0,
-        requested_yinterval=1.0,
-        stack_type=c.GDC_STACK_LAYER,
-    )
-    c.draw(style,
-        (request.cfg.chart_options['width'], request.cfg.chart_options['height']),
-        image, labels)
+    c.title = title.encode('iso-8859-1','replace') + _('Page Size Distribution').encode('iso-8859-1', 'replace')
+    c.width=request.cfg.chart_options['width']
+    c.height=request.cfg.chart_options['height']
+    c.xtitle=_('page size upper bound [bytes]').encode('iso-8859-1', 'replace')
+    c.ytitle=_('# of pages of this size').encode('iso-8859-1', 'replace')
+    #c.annotate(point=bisect.bisect(bounds, upper_bound), color='black', note="%d %s" % sizes[-1])
+    c.title_font_size="GIANT"
+    c.stack_type="LAYER"
+    c.threeD_depth=2.0
+    c.requested_yinterval=1.0
+    c.setLabels(labels)
+
+    import tempfile
+    f = tempfile.NamedTemporaryFile(suffix=".gif")
+    c.draw(f.file)
+    f.file.seek(0)
+    image.write(f.file.read())
+    f.close()
+
 
     request.content_type = 'image/gif'
     request.content_length = len(image.getvalue())
diff -x '*.orig' -r -u moin-1.9.1-orig/MoinMoin/stats/useragents.py moin-1.9.1/MoinMoin/stats/useragents.py
--- moin-1.9.1-orig/MoinMoin/stats/useragents.py	2010-01-18 13:49:33.000000000 +0100
+++ moin-1.9.1/MoinMoin/stats/useragents.py	2010-02-14 17:24:28.000000000 +0100
@@ -120,12 +120,11 @@
 
 def draw(pagename, request):
     import shutil, cStringIO
-    from MoinMoin.stats.chart import Chart, ChartData, Color
+    import gdchart
+    from MoinMoin.util.web import Color
 
     _ = request.getText
 
-    style = Chart.GDC_3DPIE
-
     # get data
     colors = ['red', 'mediumblue', 'yellow', 'deeppink', 'aquamarine', 'purple', 'beige',
               'blue', 'forestgreen', 'orange', 'cyan', 'fuchsia', 'lime']
@@ -152,26 +151,34 @@
 
     # create image
     image = cStringIO.StringIO()
-    c = Chart()
-    c.addData(data)
+    c = gdchart.Pie3D()
+    c.bg_color= 0xffffff
+    c.line_color = 0x000000
+    c.setData(*data)
 
     title = ''
     if request.cfg.sitename: title = "%s: " % request.cfg.sitename
     title = title + _('Distribution of User-Agent Types')
-    c.option(
-        pie_color=colors,
-        label_font=Chart.GDC_SMALL,
-        label_line=1,
-        label_dist=20,
-        threed_depth=20,
-        threed_angle=225,
-        percent_labels=Chart.GDCPIE_PCT_RIGHT,
-        title_font=c.GDC_GIANT,
-        title=title.encode('iso-8859-1', 'replace')) # gdchart can't do utf-8
+    c.color=colors
+    c.label_font_size=0 #'SMALL'
+    c.label_line=1
+    c.label_dist=20
+    c.threeD_depth=20
+    c.threeD_angle=225
+    c.percent_labels='RIGHT'
+    c.title_font_size=2 #"GIANT"
+    c.title=title.encode('iso-8859-1', 'replace') # gdchart can't do utf-8
     labels = [label.encode('iso-8859-1', 'replace') for label in labels]
-    c.draw(style,
-        (request.cfg.chart_options['width'], request.cfg.chart_options['height']),
-        image, labels)
+    c.setLabels( labels )
+    c.width = request.cfg.chart_options['width']
+    c.height = request.cfg.chart_options['height']
+
+    import tempfile
+    f = tempfile.NamedTemporaryFile(suffix=".gif")
+    c.draw(f.file)
+    f.file.seek(0)
+    image.write(f.file.read())
+    f.close()
 
     request.content_type = 'image/gif'
     request.content_length = len(image.getvalue())
