问题
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 !
回答1:
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
}
}
来源:https://stackoverflow.com/questions/22761836/google-area-chart-variable-opacity-under-line