Presentation is loading. Please wait.

Presentation is loading. Please wait.

Google Charts API Ashwin Neurgaonkar 10/13/2008. What are APIs ? API stands for ‘Application Programmable Interface’. As it’s name implies, it is an interface.

Similar presentations


Presentation on theme: "Google Charts API Ashwin Neurgaonkar 10/13/2008. What are APIs ? API stands for ‘Application Programmable Interface’. As it’s name implies, it is an interface."— Presentation transcript:

1 Google Charts API Ashwin Neurgaonkar 10/13/2008

2 What are APIs ? API stands for ‘Application Programmable Interface’. As it’s name implies, it is an interface that queries the Google database to help programmers in the development of their applications. Why use them ? Easy access to google`s services Reduced overhead for developers Objective: To understand the basics of Google Charts API.

3 Basics: Google Chart API The URL http://chart.apis.google.com/chart? & & Refer http://code.google.com/apis/chart/#maps http://code.google.com/apis/chart/#maps http://chart.apis.google.com/chart? chs=250x100 // chart size &chd=t:60,40 // chart data &cht=p3 // chart type &chl=Hello|World // labels http://chart.apis.google.com/chart?chs=300x150&chd=t:60,40&cht=p3 &chl=Hello|World&chtt=This+is+so+cool!

4 Features Several types of charts. (pie/bar/sparklelines/Radar/Venn diagrams etc) Options like Range markers/solid fill/linear gradient/linear stripes/labels and legends make the charts look complete and definitive. Multiple types of Text encoding. Availability! google never fails …

5 Using API with PHP Open source libraries with ready classes available. Some useful links: http://luddep.se/notebook/2008/04/13/char ts-php-and-google-charts-api/ http://code.google.com/p/gchartphp/

6 sample <?php $chart = new googChart(); $chart->setChartAttrs( array( 'type' => 'pie', 'data' => $data, 'size' => array( 300, 200 ) )); echo $chart; <?php $data = array( 'IE7' => 22, 'IE6' => 30.7, 'IE5' => 1.7, 'Firefox' => 36.5, 'Mozilla' => 1.1, 'Safari' => 2, 'Opera' => 1.4, );

7 Issues to consider Most readily available classes only implement a small subset of available google charts functions. Licensing may be a problem. Fixing bugs may consume too much time. Max size available is 300,000 pixels. i.e maximum sizes are 1000x300, 300x1000, 600x500, 500x600, 800x375, and 375x800.

8 Licensing Google APIs are NOT open source, but free to be used by developers. No licensing issues! Third party Implementations/libraries/classes for Google API maybe open source hence, licensing issues must be considered.

9 Some interesting uage Thematic mapping using google API http://themechanism.com/blog/2008/03/30/thematic- mapping-with-the-google-charts-api-a-brief-tutorial/http://themechanism.com/blog/2008/03/30/thematic- mapping-with-the-google-charts-api-a-brief-tutorial/ Generating charts from tables http://icant.co.uk/sandbox/datatable-to-chart/ Using the Google Chart API with Microsoft Excel http://www.tushar- mehta.com/publish_train/xl_vba_cases/excel_google_ch art_api/index.htmhttp://www.tushar- mehta.com/publish_train/xl_vba_cases/excel_google_ch art_api/index.htm


Download ppt "Google Charts API Ashwin Neurgaonkar 10/13/2008. What are APIs ? API stands for ‘Application Programmable Interface’. As it’s name implies, it is an interface."

Similar presentations


Ads by Google