Adding solid color from SVG file into a Google Timeline Chart

Viewed 26

I am creating a google timeline chart in which I am using solid colors for each bar. I am setting colors to each bar in the following way,

dataTable.addRows(['Washington', #f7cf2f ,new Date(2022,5,1), new Date(2022,6,2) ])

Current requirement,

I have a combination of 2 solid colors stored in a svg file as below.

<svg xmlns="http://www.w3.org/2000/svg" id="svg1" viewBox="0 0 20 20" >
    <defs>
        <style>
            .color{fill:#888}
            .color1{fill:red}
        </style>
        </defs>
        <rect class="color" y="5" width="10" height="5"/>
        <rect class="color1" width="10" height="5"/>        
</svg>

I want to use the above solid color combo from the svg file in my timeline chart bar. How to achieve the same.

0 Answers
Related