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
Click the Chart style arrow to display the options. Set the color of the chart area. Click Background color. Pick an option.
pass the options like this
var options = { title: 'title', width: 310, height: 260, backgroundColor: '#E4E4E4', is3D: true };
add this to your options:
'chartArea': { 'backgroundColor': { 'fill': '#F4F4F4', 'opacity': 100 }, }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With