adding lines into a google bar chart

762 views
Skip to first unread message

Florjon Koci

unread,
Sep 23, 2012, 4:49:50 PM9/23/12
to google-visua...@googlegroups.com

i am trying to add 3 static lines to a google bar chart. i have tried so hard to play with margins, but i'm not understanding the logic.

can someone help me plz

thnx in advance

asgallant

unread,
Sep 23, 2012, 5:18:08 PM9/23/12
to google-visua...@googlegroups.com
Do you mean a BarChart or a ColumnChart, and do you want horizontal lines or vertical lines?

Florjon Koci

unread,
Sep 23, 2012, 5:23:25 PM9/23/12
to google-visua...@googlegroups.com
hi,

i mean a BarChart, and i want the horizontal line.

thnx.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/oamzxQDAeX8J.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.

asgallant

unread,
Sep 24, 2012, 1:49:16 AM9/24/12
to google-visua...@googlegroups.com
The only horizontal lines you can get on BarCharts are gridlines, which you will get if your domain axis is a continuous axis type (uses type 'number', 'date', 'datetime', or 'timeofday').  You can't get them with discrete axes (type 'string').

With gridlines, you can control how many there are, but you cannot choose where they are placed.


On Sunday, September 23, 2012 5:23:29 PM UTC-4, Florjon Koci wrote:
hi,

i mean a BarChart, and i want the horizontal line.

thnx.

On Sun, Sep 23, 2012 at 11:18 PM, asgallant <drew_g...@abtassoc.com> wrote:
Do you mean a BarChart or a ColumnChart, and do you want horizontal lines or vertical lines?


On Sunday, September 23, 2012 4:49:50 PM UTC-4, Florjon Koci wrote:

i am trying to add 3 static lines to a google bar chart. i have tried so hard to play with margins, but i'm not understanding the logic.

can someone help me plz

thnx in advance

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/oamzxQDAeX8J.

To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.

Ambientson

unread,
Nov 12, 2012, 4:15:20 PM11/12/12
to google-visua...@googlegroups.com
Hi,

I am trying to get something similar to work and although I've found a way to do it, I don't like my approach...

Here's what I'm trying to achieve:

On a horizontal bar chart (bars parallel to horizontal axis), I'd like a fixed vertical line drawn on the chart at a set value (100). My haxis is continuous (number).

The only way I've found to get this is through a combo chart by adding a serie with values x = 100 for every y.

There's got to be a better way of doing this with gridlines or axes, no?

Thanks.

asgallant

unread,
Nov 12, 2012, 5:10:20 PM11/12/12
to google-visua...@googlegroups.com
There's no way to add a vertical line to the BarCharts other than the gridlines.  You can't add horizontal bars to the ComboCharts either.  If you use ComboCharts, you can combine columns with a line series to achieve the effect you want with vertical bars and a horizontal line, but it sounds like that's the solution you already found.

Ambientson

unread,
Nov 12, 2012, 6:21:48 PM11/12/12
to google-visua...@googlegroups.com
Too bad... I don't like adding dummy series just for display purposes...

Thanks for the quick answer and cheers!
Reply all
Reply to author
Forward
0 new messages