Sections
Sub-Sections
Start Page
Index
History
Download
Plain Text
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Hello World 3D Pie Chart Example

This is the first example on the Google Chart API documentation.

Generated Image

Hello World 3D Pie Chart

Generated URL

 http://chart.apis.google.com/chart?cht=p3&chs=250x100&chd=s:pU&chl=Hello|World

Example Source Code

from pygooglechart import PieChart3D

# Create a chart object of 250x100 pixels
chart = PieChart3D(250, 100)

# Add some data
chart.add_data([20, 10])

# Assign the labels to the pie data
chart.set_pie_labels(['Hello', 'World'])

# Print the chart URL
print chart.get_url()

# Download the chart
chart.download('pie-hello-world.png')