Creating a vertical line can be done either by adding a domain-axis annotation with the style option set to "line", or by adding an additional data series with two (x, y) points sharing a common x-value. The horizontal line can be added with an additional data series with two (x, y) points sharing a common y-value. If these lines can be the same color, then you can use a single data series to accomplish this. Here's an example: http://jsfiddle.net/asgallant/cq27yf6v/
On Monday, October 20, 2014 4:38:52 PM UTC-4, Stephen Huey wrote: > > I have a line chart and I'm displaying point values like a scatter chart, > meaning there is no line connecting the points. I'd like to also draw on > the same chart 2 other lines: a vertical line and horizontal line not > related to the aforementioned points. I'm placing labels next to the point > with an annotation in my data. I've read that an additional annotation can > be used to draw a vertical line, but it didn't draw the line all the way > across. However, this seems like the wrong approach. Without using an > additional annotation, isn't there a simple way to say at such-and-such X > value, draw a vertical line? It seems like if I attempt to put 2 line > charts on the same chart, it won't do what I want because in the options > the line is either on or off. Plus I tried to call draw again with > different data and the first round of data was erased, so I'm hoping > there's a simple solution for this. > > Thanks, > Stephen > > -- 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.
