Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript JS谷歌图表可以';不要改变饼图的背景色_Javascript_Charts_Google Visualization - Fatal编程技术网

Javascript JS谷歌图表可以';不要改变饼图的背景色

Javascript JS谷歌图表可以';不要改变饼图的背景色,javascript,charts,google-visualization,Javascript,Charts,Google Visualization,我尝试了这个代码,但是我的馅饼背景颜色仍然是蓝色。。你能给点建议吗 var options = { chart: { backgroundColor: 'brown', // for the area outside the chartArea chartArea: { backgroundColor: 'green' } } }; chartArea不是有效的键。。。只需使用backgroundColor var options = { backgroun

我尝试了这个代码,但是我的馅饼背景颜色仍然是蓝色。。你能给点建议吗

  var options = {

  chart: {
  backgroundColor: 'brown', // for the area outside the chartArea
  chartArea: {
  backgroundColor: 'green'
}
  }

};

chartArea
不是有效的键。。。只需使用
backgroundColor

var options = {
    backgroundColor: 'brown',
    chartArea: {
        backgroundColor: 'green'
    }
}

是的,您的代码更改了div的背景颜色,但我需要更改图形(饼图)的背景颜色。有可能吗?@WebsiteFreelor,你是说馅饼“切片”吗?如果是,那么是的。非常感谢much@WEBSITEFREELANCE,没问题。如果我的答案是有用的,请考虑把我的答案标记为已接受。谢谢