/+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-05-03 07:30:58 UTC
  • Revision ID: git-v1:9342edb8666dde7e843e3eb438f1f6a717aa32fc
- Really added initial unit tests
- Converted setup.py to unix file format
- warnings made when data is being clipped and when data scaling is incorrect
- max_value is now a variable
- pie and google-o-meter chart data is now on the x-axis
- More grammar work

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():