Changeset 31
- Timestamp:
- 10/17/07 11:13:43 (5 years ago)
- Location:
- trunk/examples
- Files:
-
- 1 added
- 2 modified
-
lines.py (added)
-
piechart.png (modified) (previous)
-
piechart.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/piechart.py
r30 r31 22 22 import pycha.pie 23 23 24 from lines import lines 25 24 26 def pieChart(output): 25 27 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 400, 400) 26 28 27 dataSet = ( 28 ('bar.py', [[0, 180]]), 29 ('chart.py', [[0, 437]]), 30 ('color.py', [[0, 61]]), 31 ('line.py', [[0, 96]]), 32 ('pie.py', [[0, 187]]), 33 ) 29 dataSet = [(line[0], [[0, line[1]]]) for line in lines] 34 30 35 31 options = { 36 32 'axis': { 37 33 'x': { 38 'ticks': [dict(v=i, label=d[0]) for i, d in enumerate( dataSet)],34 'ticks': [dict(v=i, label=d[0]) for i, d in enumerate(lines)], 39 35 } 40 36 },
