如何在Google图表中为特定范围设置颜色? [英] How do I set color for specific range in Google Chart?
本文介绍了如何在Google图表中为特定范围设置颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是图表的新手,所以我创建了一个google图表线,并且需要为某些范围更改背景颜色,如下图所示.
I'm new with charts, so I have created a google charts lines, and I need to change background color for some range as seen in the picture below.
到目前为止,我的代码非常基本,看起来像这样:
my code so far is pretty basic and looks like this:
var options = {
vAxis: {
viewWindow: {
min: 0,
max: 100
},
ticks: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
}
};
如何在vAxis中将背景颜色例如从0更改为20
how can I change background color for example from 0 to 20 in my vAxis to look like this
推荐答案
经过深入研究,我发现了位于此链接上的解决方案 Google折线图(交互式)API-我们如何在指定区域填充不同的背景颜色
After some intensive research, I found the solution that lies on this link Google line chart(interactive) api - how we fill different background colors on specified areas
这篇关于如何在Google图表中为特定范围设置颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文