6
ROOT = os.path.dirname(os.path.abspath(__file__))
7
sys.path.insert(0, os.path.join(ROOT, '..'))
9
from pygooglechart import PieChart2D
10
from pygooglechart import PieChart3D
17
# Create a chart object of 200x100 pixels
18
chart = PieChart3D(250, 100)
21
chart.add_data([20, 10])
23
# Assign the labels to the pie data
24
chart.set_pie_labels(['Hello', 'World'])
27
chart.download('pie-hello-world.png')
29
def house_explosions():
31
Data from http://indexed.blogspot.com/2007/12/meltdown-indeed.html
33
chart = PieChart2D(int(settings.width * 1.7), settings.height)
34
chart.add_data([10, 10, 30, 200])
35
chart.set_pie_labels([
39
'Attempts to escape morgage',
41
chart.download('pie-house-explosions.png')
47
if __name__ == '__main__':
3
Copyright Gerald Kaszuba 2008
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
22
ROOT = os.path.dirname(os.path.abspath(__file__))
23
sys.path.insert(0, os.path.join(ROOT, '..'))
25
from pygooglechart import PieChart2D
26
from pygooglechart import PieChart3D
33
# Create a chart object of 200x100 pixels
34
chart = PieChart3D(250, 100)
37
chart.add_data([20, 10])
39
# Assign the labels to the pie data
40
chart.set_pie_labels(['Hello', 'World'])
43
chart.download('pie-hello-world.png')
45
def house_explosions():
47
Data from http://indexed.blogspot.com/2007/12/meltdown-indeed.html
49
chart = PieChart2D(int(settings.width * 1.7), settings.height)
50
chart.add_data([10, 10, 30, 200])
51
chart.set_pie_labels([
55
'Attempts to escape morgage',
57
chart.download('pie-house-explosions.png')
63
if __name__ == '__main__':