How can I add a vertical line on the X axis in a Google Chart' chart (Line type)?

19 views
Skip to first unread message

Belen Dominguez Garcia

unread,
Oct 19, 2018, 7:21:26 AM10/19/18
to Google Visualization API
I'm working with react and Google Charts and I just found a problem that I can not find the solution for.

I have this component
   
 <Chart chartType='Line' data={data} options={options} />


And here are the values to data and options:

   
const data = [
           
["Year", "Value"],
           
["2020", 48.92],
           
["2025", 49.45],
           
["2030", 49.24],
           
["2035", 50.93],
           
["2040", 49.62],
           
["2025", 49.62]
     
];
       
var options = {
            legend
: "none",
            colors
: ['#a52714', '#097138']
       
};


This chart works well, but now **I need add a vertical line only in the year 2025**.

How can I do it?

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages