Google Graphic API

Google has released a very intriguing application programming interface to dynamically create charts.

Simply by tacking a string of parameters on the back end of the Google Chart API url, the charting engine will dynamically generate a chart on the fly and return to you with a PNG-format image.

The Google API site is http://chart.apis.google.com/

I just tack this string of parameters on the back end and the site generates the chart below.

chart?chs=630×300&chbh=35,15&chtt=PSU+Scoring+Averages&chts=0000FF,30&chco=00396e
&chf=bg,s,efefef&chg=0,20&chd=t:76.4,45.6,37.2,30.4,29.6,22.4,19.6,19.2,13.6,9.2
&cht=bvs&chxt=x,y
&chxl=0:|Clax|Corn|Morr|Batt|Walk|Jax|Jonz|Prng|Hass|Brx|1:|0|5|10|15|20|

PSU Scoring Averages

It’s pretty slick. I’m definitely going to use it to generate charts about my tempo free stats.

Just to decipher the string a little for those who might care:

chart? – create a chart
chs=550×300 – make it 550 by 300 pixels
&chbh=35,15 – make the bars 35 pixels wide with 15 pixels between them
&chtt=PSU+Scoring+Averages – title the chart PSU Scoring Averages
&chts=0000FF,30 – make the title bright blue and size 30
&chco=00396e – make the bars a dark blue color
&chf=bg,s,efefef – fill the background with a solid grey color
&chg=0,20 – create grid lines every 20 units of the y axis
&chd=t:76.4,45.6,37.2,30.4,29.6,22.4,19.6,19.2,13.6,9.2 (the data – it equals 4x each guys scoring avg to make it scale correctly)
&cht=bvs – make it a bar chart with vertical bars
&chxt=x,y – create an x and a y axis
&chxl=0:|Clax|Corn|Morr|Batt|Walk|Jax|Jonz|Prng|Hass|Brx|1:|0|5|10|15|20| – label each axis

Pretty slick deal.