/+junk/pygooglechart-py3k

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/pygooglechart-py3k

« back to all changes in this revision

Viewing changes to examples/pie.py

  • Committer: gak
  • Date: 2007-12-16 00:39:42 UTC
  • Revision ID: git-v1:81d32a581f1f4542258878853e7643ccd4718a06
Fixed pie labels and not encoded characters

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
import helper
14
14
 
15
15
def hello_world():
16
 
 
17
 
    # Create a chart object of 200x100 pixels
18
 
    chart = PieChart3D(250, 100)
19
 
 
20
 
    # Add some data
21
 
    chart.add_data([20, 10])
22
 
 
23
 
    # Assign the labels to the pie data
 
16
    chart = PieChart3D(settings.width, settings.height)
 
17
    chart.add_data([ord(a) for a in 'hW'])
24
18
    chart.set_pie_labels(['Hello', 'World'])
25
 
 
26
 
    # Download the chart
27
19
    chart.download('pie-hello-world.png')
28
20
 
29
21
def house_explosions():