Alex headshot

AlBlue’s Blog

Macs, Modularity and More

Use transparent backgrounds in Google Chart

2007

I'm pretty impressed with the new Google Chart APIs. If you ever need to throw a quick graph together, that seems to be a really easy way of adding it to the site. (The chart points out the number of my blog posts per month over the last three years.)

Anyway, one feature that's lacking (from the help documentation) is the ability to have a transparent background. In fact, it is possible — all you need to do is have an alpha value of 00, and the background is transparent. The way I'm doing the transparency with the chart below is specifying chf=bg,s,65432100. That means you can do fun things like put an image underneath and see it come through ... as long as you're using a browser that handles transparency, of course.