visitor stats

Create Charts Online with Google Chart API

Google Charts

Google has recently released some pretty neat API for it’s Google Chart. It allows you to create charts on your browser dynamically, on the fly and free. Here’s all you need to do:

  1. Open up a browser
  2. Paste in the following URL
    http://chart.apis.google.com/chart?cht=p3&chd=t:20,40,80&chs=250&chl=A|B|C
  3. Tweak the settings.
  4. Hit enter, download your chart.

Customizing your chart

Google Chart

Here’s a general explanation on the parameters of the URL.

  • cht=p3 - Type of chart
  • chd=t:20,40,80 - Values, separated by commas.
  • chs=250×150 - Chart size, width x height
  • chl=A|B|C - Labels of each chart sections.

You can create up to 5 different charts (Line charts, Bar charts, Pie charts, Veen diagrams and Scatter plots ) with Google Chart API, as well as tweaking the colors, line styles, markers, etc. All these are well explained on Google Chart API code page.

Related Contents

Sponsors

Posted by hongkiat in Google, Web Tricks , at 12.10.07

Tags: ,

Comments

  1. Adam December 11th, 2007

    We’ve actually written a wrapper class for the Google Chart API if you click the link in my name.

    Reply
  2. Corey December 13th, 2007

    Awesome write up on the google charts. I threw something together too about integrating it with Deki Wiki and making it easier to change the values of the chart.

    http://www.mindtouch.com/blog/2007/12/11/google-charts-and-graphs/

    Reply
  3. hongkiat December 13th, 2007

    Thanks for the heads up!

    Reply

Leave a reply