Google Chart API
Encyclopedia
The Google Chart API is a tool that lets people create a chart from some data and embed it in a web page
. Google
creates a 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.
Originally it was an internal tool to support rapid embedding of charts within Google's own applications (like Google Finance
for example). Google decided it would be a useful tool to make available 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.
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,7D858Fhttp://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]
libraries available for most programming languages.
Web page
A web page or webpage is a document or information resource that is suitable for the World Wide Web and can be accessed through a web browser and displayed on a monitor or mobile device. This information is usually in HTML or XHTML format, and may provide navigation to other web pages via hypertext...
Google
Google Inc. is an American multinational public corporation invested in Internet search, cloud computing, and advertising technologies. Google hosts and develops a number of Internet-based services and products, and generates profit primarily from advertising through its AdWords program...
creates a 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.
Originally it was an internal tool to support rapid embedding of charts within Google's own applications (like Google Finance
Google Finance
Google Finance is a website launched on March 21, 2006 by Google. The service features business and enterprise headlines for many corporations including their financial decisions and major news events. Stock information is available, as are Adobe Flash-based stock price charts which contain marks...
for example). Google decided it would be a useful tool to make available to web developers. It officially launched on December 6, 2007.
Currently, line
Line chart
A line chart or line graph is a type of graph, which displays information as a series of data points connected by straight line segments. It is a basic type of chart common in many fields. It is an extension of a scatter graph, and is created by connecting a series of points that represent...
, bar
Bar chart
A bar chart or bar graph is a chart with rectangular bars with lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally....
, pie
Pie chart
A pie chart is a circular chart divided into sectors, illustrating proportion. In a pie chart, the arc length of each sector , is proportional to the quantity it represents. When angles are measured with 1 turn as unit then a number of percent is identified with the same number of centiturns...
and radar charts, as well as Venn diagrams, scatter plots, sparklines, maps
MAPS
Maps is the plural of map, a visual representation of an area.As an acronym, MAPS may refer to:* Mail Abuse Prevention System, an organisation that provides anti-spam support...
, google-o-meters, and QR codes are supported.
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,7D858Fhttp://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 sourceOpen source
The term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
libraries available for most programming languages.
Platform | Name | Website |
---|---|---|
Java Java (programming language) Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities... |
Google Chart API wrapper | http://code.google.com/p/googlechartwrapper/ |
Java Java (programming language) Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities... |
charts4j | http://code.google.com/p/charts4j/ |
C#/.NET .NET Framework The .NET Framework is a software framework that runs primarily on Microsoft Windows. It includes a large library and supports several programming languages which allows language interoperability... |
ngchart | http://code.google.com/p/ngchart/ |
Ruby Ruby (programming language) Ruby is a dynamic, reflective, general-purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was first developed and designed by Yukihiro "Matz" Matsumoto... |
gchart | http://rubyforge.org/projects/gchart |
Python Python (programming language) Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive... |
google-chartwrapper | http://code.google.com/p/google-chartwrapper/ |
PHP PHP PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document... |
gchartphp | http://code.google.com/p/gchartphp/ |