Create charts with Google Chart API for your web applications

April 3rd, 2009 by Sunil

First of all I am thanking to every one to make my last blog a hit. I got a lot of comments even one guy from Microsoft. Once again thanks to everyone

Google is always coming with innovations that make the people life easy. Hope you have remembered my post in google category. That was about “Language translation ajax api for Indian languages from Google”. Like that couple of weeks back Google has announced Google maps ajax api. If you are a web developer you can simply use the Google Chart API to create charts (dynamically) for your web applications. It was using by Google for their Google Finance, Google Video etc. It looks nice and tones of options.

Different types of charts available with Google chart API

  • Line charts
  • Bar charts
  • Pie charts Updated!
  • Venn diagrams
  • Scatter plots
  • Radar charts
  • Maps
  • Google-o-meters
  • QR codes

How to generate the chart?

We can simply generate the chart by calling the url like this


http://chart.apis.google.com/chart?<parameter 1>&<parameter 2>&<parameter n>

eg: 

http://chart.apis.google.com/chart?

chs=250×100
&chd=t:60,40
&cht=p3
&chl=Hello|World

Where:

http://chart.apis.google.com/chart? is the Chart API’s location.

& separates parameters.

chs=250×100 is the chart’s size in pixels.

chd=t:60,40 is the chart’s data.

cht=p3 is the chart’s type.

chl=Hello|World is the chart’s label.

I am not able to describe all the options. Please have a look at the Google chart API documentation.

  1. [...] Create charts with Google Chart API for your web applications … [...]