Create Charts Online with Google Chart API

By . Filed in google, Web Tricks

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.

Author:

Alfredo K is Hongkiat.com’s editor. He believes in working hard, and playing hard and hopes to one day publish his own travel guide for the food lover.

Advertisement