You can't color the easy-to-implement solid lines.  Adding them is as 
simple as adding an "annotation" role column to your domain column, and 
setting the annotation style to "line": http://jsfiddle.net/asgallant/hZb3s/

Making the dashed lines appear requires adding a new data series to hold 
the values for the dashed lines, and a "certainty" role column to make the 
line dashed (one of each for each color of dashed line that you want).  You 
must use a continuous data type for your domain axis (either "number", 
"date", "datetime", or "timeofday"), a "string" type (as in your example 
code) will not work.  Wherever you want the vertical line to appear, you 
need to have one row of data for each end of the line (these can be shared 
with the rest of your data, but do not have to be), and since the lines are 
vertical, the x-axis values must be the same (this is why string axes won't 
work - they treat each row as a separate value, even when the strings are 
the same).  You need to set appropriate y-values for each end of the line; 
if you want the line to span from the top of your chart to the bottom, you 
need to set values that lie outside your data set (and then set the 
vAxis.viewWindow sub-options to an appropriate range).  Here is a 
simplified example: http://jsfiddle.net/asgallant/D8fhD/

On Monday, April 14, 2014 3:46:13 AM UTC-4, Partha Satapathy wrote:
>
> If the vertical lines can be solid lines then can we put color to them or 
> show them differently? 
>
> On Monday, April 14, 2014 12:24:27 PM UTC+5:30, Partha Satapathy wrote:
>
> Yeah, as per the requirements these vertical lines have to be dashed. Can 
> you please send me the code for both solid and dashed lines, so that I can 
> show the POC to my client.
>
> On Friday, April 11, 2014 9:52:47 PM UTC+5:30, Andrew Gallant wrote:
>
> Do the vertical lines have to be dashed?  There is an easy way to get 
> solid vertical lines, dashed vertical lines would be substantially more 
> complicated to implement.
>
> On Friday, April 11, 2014 4:25:24 AM UTC-4, Partha Satapathy wrote:
>
>
> Hi,
>
> I have attached my chart requirement. I was trying to do the chart with 
> some dummy data but I am not able to get the vertical dashed lines after 
> certain intervals. 
> Can any one of you please guide me to achieve the required chart?
>
> Please find the dummy data I am using for my chart.
>
> function drawVisualization() {
>   // Create and populate the data table.
>   var data = google.visualization.arrayToDataTable([
>     ['Month',       'M1',    'M2',      'M3',   'm4',         'm5',      
>    'm6'],
>     ['8',  0,        0,           600,          null,          1250,      
>     null],
>     ['10',  35,       50,          600,          null,          1250,    
>       null],
>     ['12',  70,       100,          600,         null,          1250,    
>       null],
>     ['2',  100,      150,        600,           null,          1250,      
>     null],
>     ['4',  120,      200,        600,           null,          1250,      
>     null],
>     ['5',  135,      250,        600,           900,          1250,      
>     1250],
>     ['6',  200,      300,        null,          900,          1250,      
>     null],
>     ['8',  257,      350,        null,          900,          1250,      
>     null],
>     ['10',  270,      400,        null,          900,          1250,      
>     null],
>     ['12',  275,      450,        null,          900,          1250,      
>     null],
>     ['2',  285,      500,        null,          900,          1250,      
>     null],
>     ['4',  290,      550,        null,          900,          1250,      
>     null],
>     ['5',  295,      600,        null,          900,          1250,      
>     1250],
>     ['6',  300,      650,        null,          null,          1250,      
>     null],
>     ['8',  400,      700,        null,          null,          1250,      
>     null],
>     ['10',  500,      750,        null,          null,          1250,    
>       null],
>     ['12',  600,      800,        null,          null,          1250,    
>       null],
>     ['2',  700,      850,        null,          null,          1250,      
>     null],
>     ['4',  750,      900,        null,          null,          1250,      
>     null],
>     ['5',  800,      950,        null,          null,          1250,      
>     1250],
> <
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to