Edmonton Web Design and Photography

Google Chart API


Posted in: Design, Programming on January 8th, 2008

Pie chart Adam Patterson The Google Chart API lets you dynamically generate charts. The thumbnail for this article is generated by Google’s Chart API. The API is simple, the image is generated from URL parameters. The following Code chunk breaks down the images into its basic components.

Download the Source File.
Downloaded 677 Times.

<img src="http://chart.apis.google.com/chart?
chs=200x100&
cht=p3&
chl=1|2|3|4&
chd=t:3,6,8,3&
chtt=Google+Pie&
chco=00a7ff"
/>

Bellow is a break down of what some of the variables do.

  1. http://chart.apis.google.com/chart? = AIR URL
  2. chs = Image Dimension
  3. cht = Chart Type
  4. chl = Chart Title’s
  5. chd = Data (the “t” is for text string and a “s” is for secure or encoded)
  6. chtt = Image Title
  7. chco = Primary Chart Colours

View an example with dynamic content.

Check out Googles Site for all the info.

No Responses to “ Google Chart API ”


Search


Archive


Subscribe