Google Charts (JS) - is there a way of using a transparent background on a chart?

johneth picture johneth · Sep 14, 2011 · Viewed 54k times · Source

I'm using the Google Charts API to include various graphs on a webapp I'm working on. I'm using the javascript chart tools (not the image chart tools), and am wondering if it's possible to use a transparent background on a chart (e.g. line graph, pie chart, etc.)?

Answer

maxjakob picture maxjakob · Oct 19, 2011

In the Configuration Options of the chart, specify

backgroundColor: { fill:'transparent' }

This worked for me in Chrome and Firefox. It took me some time to find out. The doc page says you can only put in HTML color strings and I assumed 'transparent' was not one of them.