Jump to content

Google Chart API: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Link to recommended alternative. Remove link to 3rd party solution (will put it here: https://en.wikipedia.org/wiki/Comparison_of_online_interactive_charts)
Rewrite the introduction in the active mode
Line 23: Line 23:
}}
}}


The '''Google Chart API''' is a tool that lets people easily create a chart from some data and embed it in a web page. Google creates a [[Portable Network Graphics|PNG]] image of a chart from data and formatting parameters in an [[HTTP]] request. Many types of charts are supported, and by making the request into an image tag, people can simply include the chart in a web page.
The '''Google Chart API''' is an interactive [[Web service]] (now [[deprecated]]) that creates [[Graphics|graphical]] [[chart]]s from user-supplied data. Google servers create a [[Portable Network Graphics|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 [[HTML_element#img|image tag]].


Originally it was an 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.
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.
Currently, line, bar, pie, and [[radar charts]], as well as [[Venn diagrams]], [[scatter plots]], [[sparklines]], [[maps]], google-o-meters, and [[QR codes]] are supported.


This [[API]] was [[deprecated]] in 2012<ref>[http://googledevelopers.blogspot.com.br/2012/04/changes-to-deprecation-policies-and-api.html Google Developers Blog]</ref> with guaranteed availability until April 2015. After that period, Google reserves the right to turn it off without notice, although as of April 2016, there are no plans to do so.<ref>[https://developers.google.com/chart/image/ Image Charts documentation, retrieved 6 April 2016]</ref> The alternative recommended by Google is [https://developers.google.com/chart/ Google Charts].<ref>[https://developers.google.com/chart/ Google Charts]</ref>
This API was deprecated in 2012<ref>[http://googledevelopers.blogspot.com.br/2012/04/changes-to-deprecation-policies-and-api.html Google Developers Blog]</ref> with guaranteed availability until April 2015. After that period, Google reserves the right to turn it off without notice, although as of April 2016, there are no plans to do so.<ref>[https://developers.google.com/chart/image/ Image Charts documentation, retrieved 6 April 2016]</ref> Google recommends the successor service [[Google Charts]].<ref>{{cite web|url=https://developers.google.com/chart/|title=Google Charts: Interactive charts for browsers and mobile devices.}}</ref>


== Example ==
== Example ==

Revision as of 01:52, 11 February 2017

Google Chart API
Original author(s)Google
Initial release2007
Stable release
February 2010
Available inJavaScript
Websitecode.google.com/apis/chart/

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.

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

Example

The following URL creates the pie chart below:
http://chart.apis.google.com/chart?
chs=200x200
&chdlp=b
&chtt=Uberman
&chdl=Asleep|Awake
&chd=t:1,11,1,11,1,11,1,11,1,11,1,11
&cht=p
&chco=586F8E,7D858F,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[4] https://code.google.com/p/googlechartwrapper/
Java charts4j[5] 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

References

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