/+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: 2008-09-11 23:52:02 UTC
  • Revision ID: git-v1:1f3559184c106bcd2ec18a65cd3f7f8c06beca53
 - Few fixes for python 3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
import helper
14
14
 
15
15
def hello_world():
16
 
    chart = PieChart3D(settings.width, settings.height)
17
 
    chart.add_data([ord(a) for a in 'hW'])
 
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
18
24
    chart.set_pie_labels(['Hello', 'World'])
 
25
 
 
26
    # Download the chart
19
27
    chart.download('pie-hello-world.png')
20
28
 
21
29
def house_explosions():