Jump to content

Google Chart API

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 182.19.62.205 (talk) at 06:44, 9 June 2017 (Example). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Google Chart API
Original author(s)Google
Initial release2007
Stable release
February 2010
Available inHTTP requests
Websitedevelopers.google.com/chart/image/

The Google Chart API is an interactive Web service (now deprecated) that creates graphical charts from user-supplied data. Google servers create a PNG image of a chart from data and formatting parameters specified by a user's HTTP request. The service supports a wide variety of chart information and formatting. Users may conveniently embed these charts in a Web page by using a simple image tag.

Originally the API was Google's internal tool to support rapid embedding of charts within Google's own applications (like Google Finance for example). Google figured it would be a useful tool to open up to web developers. It officially launched on December 6, 2007.

Currently, line, bar, pie, and radar charts, as well as Venn diagrams, scatter plots, sparklines, maps, google-o-meters, and QR codes are supported.

Google deprecated the API in 2012[1][2] with guaranteed availability until April 2015. Google now reserves the right to turn it off without notice, although as of April 2016, there are no plans to do so.[3] Google recommends the successor service Google Charts.[4]

Example

The following URL creates the pie chart below:
http://chart.apis.google.com/chart?
chs=200x200
&chdlp=b
&chtt=Uberman
&chdl=Asleep|Aw
&chd=t:11,11,11,11,11,11,11,11,11,11,11,11
&cht=p
&chco=586F8E,red,586F8E,7D858F,586F8E,7D858F,586F8E,7D858F,586F8E,7D858F,586F8E,7D858F

External Libraries

Instead of creating the URL request manually, there are many open source libraries available for most programming languages.

Platform Name Website
Java Google Chart API wrapper[5] https://code.google.com/p/googlechartwrapper/
Java charts4j[6] https://code.google.com/p/charts4j/
C#/.NET ngchart https://code.google.com/p/ngchart/
Ruby gchart http://rubyforge.org/projects/gchart
Python google-chartwrapper https://code.google.com/p/google-chartwrapper/
PHP gchartphp https://github.com/pacbard/gChartPhp

See also

References

  1. ^ Google Developers Blog
  2. ^ "Google Charts: Terms of Service: Deprecation Policy".
  3. ^ Image Charts documentation, retrieved 6 April 2016
  4. ^ "Google Charts: Interactive charts for browsers and mobile devices".
  5. ^ Google Chart API wrapper
  6. ^ charts4j