[jToolkit-cvs] jToolkit/widgets chart.py,1.4,1.5
Brought to you by:
davidfraser,
friedelwolff
From: <dav...@us...> - 2004-02-10 08:27:40
|
Update of /cvsroot/jtoolkit/jToolkit/widgets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17940 Modified Files: chart.py Log Message: Removed example which wouldn't have worked Index: chart.py =================================================================== RCS file: /cvsroot/jtoolkit/jToolkit/widgets/chart.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** chart.py 10 Feb 2004 07:52:56 -0000 1.4 --- chart.py 10 Feb 2004 08:24:30 -0000 1.5 *************** *** 53,76 **** return tempfile.getvalue() - if __name__ == '__main__': - # An example derived class. - class PieChart(Chart): - def __init__(self): - Chart.__init__(self) - - def draw(self, size, file, labels, *data): - Chart.draw(self) - args = (gdchart.GDC_3DPIE, size, file, labels) + data - apply(gdchart.chart, args) - - c = PieChart() - c.option(pie_color=(0xff8080, 0x80ff80, 0x8080ff, 0xffff80, 0xff80ff, 0x80ffff)) - c.option(edge_color=0x0, line_color=0xffffff) - c.option(label_line=1) - c.option(explode=(0,0,0,0,0,15)) - c.option(title='Have Some Pie') - cities = ('Chicago', 'New York', 'L.A.', 'Atlanta', 'Paris, MD\n(USA)', 'London') - values = (1.9, 1.3, 1.2, 0.75, 0.1, 2.0) - c.draw((250, 250), 'pie.png', cities, values) - print 'See pie.png' - --- 53,54 ---- |