Google Chart Background Color

firebait picture firebait · Jan 10, 2012 · Viewed 82.3k times · Source

I'm styling a google chart using the javascript api. I want to change the background of the area where the data is plotted. For some reason when I set background options like so:

chart.draw(data, { backgroundColor: { fill: "#F4F4F4" } })

It changes the the background of the whole chart and not the area where the data is plotted. Any ideas on how to only change the background of the plotted area? Thanks

Answer

uma shankar pandey picture uma shankar pandey · Aug 20, 2012

pass the options like this

var options = {
    title: 'title',
    width: 310,
    height: 260,
    backgroundColor: '#E4E4E4',
    is3D: true
};