Google Chart API
Do you use charts to graphitize your statistics? Well, you should. Because, they are easy for your readers, it can be used to grab attention from your readers for what you have to say and also can be used to help you make your point in an easy way.
There are some useful tools on the web that you can try out. One of the easiest one is made by Google. There are APIs that anyone can use on their web page.
How to use Google Chart API
Charts are dynamically generated. It’s really easy to use. Google Chart offers different chart types (9 to be exact). You can see the pie chart on the left. It’s just one of them.
Different charts require different optimizations.But how to embed a chart using Google Chart?
Google Charts generates images You request can be made a through a URL.
For instance, lets say I want to make a three dimensional(3d) chart for 2008 US Presidential Election results.
Step 1: URL Format
http://chart.apis.google.com/chart?<parameter 1>&<parameter 2>&<parameter n>
This is the basic URL format. You can view the parameters for different chart types.
Step 2: Parameter
All I have to do is to change the parameters. I have two candidates and their results in past election.
http://chart.apis.google.com/chart?
chs=250x100
&chd=t:53,46
&cht=p3
&chl=Barrack Obama|John Mccain
First parameter is the chart’s size in pixels, second is the data, third one is the type of chart, and last one is the labels for our data.
Step 3: Embedding
To put the graph you made on a web page, all you have to do is to get your customized URL and add it as an image. For those who don’t know how to add an image on a HTML document, you can check Google Support.
and here is how the chart looks;
That’s it.
Some Other Properties
- Colors used in charts can be changed. Click to view documentation at Google Chart Site.
- More than 250.000 daily impressions are allowed.
- Size is customizable.
Here are some other types of charts;