I am trying to set the background of Google timeline chart to transparent.Timeline Chart
Tried using
backgroundColor: 'none'
backgroundColor: 'transparent'
nothing seems to work.
Also I tried using
alternatingRowStyle: false
to remove the alternating colors in the rows. It does not work either. Any other ideas?
attr('fill-opacity','0.0'); Use the eq:() selector to select the rectangle you want to be transparent. Save this answer.
Changing the Color You can change the color of the lines that connect data points in Google Charts in two subtly different ways: with the colors option to change the chart palette, or with the series option to specify the color for particular series. In the following chart, we set the color of each series explicitly.
Use this to style the alternating rows like the non-alternating ones (works now, until Google implements this option):
svg g:first-of-type path {
stroke: #e6e6e6;
}
svg g:first-of-type rect:not(:last-child) {
fill: #ffffff;
}
This is terribly hacky, but does get the job done provided Google's SVG markup doesn't change. The container of the timeline is specified by the first "g" element. All "rect" therein can be made transparent using the fill-opacity style.
svg g:first-of-type rect {
fill-opacity: 0;
}
Example here: http://jsfiddle.net/kgto8oqw/1/
Obviously this needs more work to accommodate styling of gridlines etc. but you get the idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With