/+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 pygooglechart.py

  • Committer: gak
  • Date: 2007-12-09 07:52:54 UTC
  • Revision ID: git-v1:37f74b2bce596f04e7c48b7643f3d85f763bfe7a
fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
 
251
251
    # Downloading
252
252
    # -------------------------------------------------------------------------
253
 
    def download_graph(self, file_name):
 
253
    def download(self, file_name):
254
254
        open(file_name, 'wb').write(urllib.urlopen(self.get_url()).read())
255
255
 
256
256
    # Simple settings
599
599
 
600
600
    chart.add_fill_simple('303030A0')
601
601
 
602
 
    chart.download_graph('test.png')
 
602
 
 
603
    chart = SimpleLineChart(320, 200)
 
604
    data = [ 1, 5, 30, 10, 25 ]
 
605
    chart.add_data(data)
 
606
    chart.set_title('Hello World!')
 
607
    chart.set_axis_range(Axis.LEFT, 0, 10)
 
608
    print chart.get_url()
 
609
    chart.download('hello.png')
603
610
 
604
611
    url = chart.get_url()
605
612
    print url