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

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

问题描述

我正在使用 javascript api 为谷歌图表设计样式.我想更改绘制数据的区域的背景.出于某种原因,当我像这样设置背景选项时:

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
};

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

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