Wednesday, June 17, 2009

Using Google Charts in TRIRIGA

A customer asked a coworker of mine to embed some dashboard-style graphs on his portal to look something like this:
You can do pretty much exactly that with the Google Charts API; here is an example:

This will render a PNG image with the following parameters:

chs: chart size, e.g. 225x125
cht: chart type, here "gom" = Google-O-Meter
chtt: chart title
chl: label at end of arrow, here I just used the data value
chd: chart data, here "t:72" gives a value of 72

You can embed this in an HTML document by doing something like:

<img src=""/>

More information is here:

Many thanks to Eric Glass for this cool solution!

No comments: