Google区域图变量不透明度在行下? [英] Google area chart variable opacity under line?

查看:64
本文介绍了Google区域图变量不透明度在行下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用谷歌图表的面积图,我想知道是否有办法为每一行设置不透明度?



查看此示例:



https://developers.google.com/chart/interactive/docs/gallery/areachart?hl=nl#SimpleExample



如果我在参数数组中使用 areaOpacity:0.0 ,它会隐藏线条下面的所有颜色,但是我希望红线(销售)的不透明度为0.0(应该隐藏它)。另一行应该是1.0,有没有办法让它完成?



我一直在寻找这一段时间,并且我感觉到,米寻找错误的关键字。您可以通过系列设置数据系列来设置区域不透明度。< code>

系列索引> .areaOpacity 选项:

 系列:{
0:{
//将第一个数据序列的区域不透明度设置为0
areaOpacity:0
}
}


I am using area charts from google charts and I wondered if there is a way to set the opacity for each line ?

See this example :

https://developers.google.com/chart/interactive/docs/gallery/areachart?hl=nl#SimpleExample

If I use areaOpacity: 0.0 in the parameter array , it will hide all color underneath the lines, but I want the opacity of the red line (sales) to be 0.0 (which should hide it). The other line should be 1.0, is there any way to get it that done?

I've been searching for this a while now and I get the feeling that I'm looking for the wrong keywords. Any help is appreciated !

解决方案

You can set area opacity by data series via the series.<series index>.areaOpacity option:

series: {
    0: {
        // set the area opacity of the first data series to 0
        areaOpacity: 0
    }
}

这篇关于Google区域图变量不透明度在行下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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