January 17, 2008 - 6 comments

Easy charts with Google Chart API and Chartpart

If you're looking for a fast, easy way to generate parameters for the Google Chart API, check out Chartpart: Google Chart API and Chart Generator Tool. It features a form-based interface for setting the chart parameters, a preview of the output chart, and the code necessary to implement the chart on one's own site or blog (background on Chartpart here).

I entered:
stacked bar
320x200
Crime Summary 07
jul,aug,sep,oct,nov,dec
violent crimes,#3e606f, 10, 30, 9, 12, 15, 22
property crimes,#91aa9d, 64, 120, 130,170,175

and received the following preview and output:

Fake crime summary 2007 graph
http://chart.apis.google.com/chart?chs=320x200&cht=bvs&chtt=Crime Summary 07&chd=s:DKDEFI,Wqt79&chco=3e606f,91aa9d&chdl=violent crimes|property crimes&chxl=0:|jul|aug|sep|oct|nov|dec|&chxt=x

While I think this service is very easy two use and I'm grateful Leancode produced it, I do have two small complaints:

  1. The title field in the form limits one to 16 characters. This is not a limitation of the API, so I'm not sure why Leancode is limiting us here.
  2. I wish the ampersands (&) were escaped (&) in the output chart link. This would make it simpler to cut and paste valid code.

Published by: jeffreybarke in The Programming Mechanism

Comments are closed.