Google Chart API

| No Comments | No TrackBacks

Google introduced it Chart API last December.
For reference, I noted here my tips.

I need a 3D Pie chart. The code should looks like below:

<img src="http://chart.apis.google.com/chart?cht=p3&chd=t:50,10,40&chs=500x200&chl=PR|HTTP Status|Whois"/>

The code can break down as shown here:
"cht=p3" is the chart type, in this case, a 3D pie chart.

"chd=t:50,10,40" are the chart values, text-encoded, and separated by a comma.
The number should be ranged from 0 to 100.

"chs=500x200" is the custom chart size, 500 by 200 pixels.

"chl=PR|HTTP Status|Whois" are the different labels for the pie chart sections, separated via the pipe character. Chinese is not supported by Chart API.

chart types include: line charts, bar charts, pie charts, Venn diagrams & scatterplots.


Related Articles

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1010.cgi/2083

Leave a comment

About this Entry

This page contains a single entry by David Yin published on February 20, 2008 2:21 PM.

One-Click install of Joomla! 1.5 on Dreamhost was the previous entry in this blog.

Tax season coming is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.21-en

Online Tools