Google图表背景颜色 [英] Google Chart Background Color

查看:370
本文介绍了Google图表背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用javascript api来设计google图表。我想更改绘制数据的区域的背景。由于某些原因,当我设置背景选项如下:

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

推荐答案

传递类似这样的选项

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

这篇关于Google图表背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆