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

google-visualization

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.)?

Best Answer

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.

Related Topic