Barchart using spreadsheet datasource formatting question/request for tutorial

56 views
Skip to first unread message

Boulton Developer

unread,
Mar 27, 2012, 2:55:47 PM3/27/12
to Google Visualization API
Noob here,

I am 80% of the way to success. I have connected my chart to my Google
Spreadsheet but I don't have the options in my "Gadget" to format my
BarChart the way I need it to appear and my needs are very, very
basic.

My chart's bottom or base line is supposed to be a ruler that
incrementally defines the "Number of Studies" or, 0 - 500, statically,
not changing. There should be 2 vertical lines above showing the
success of a set of studies, 1 represented by a blue line, the other
red. In the spreadsheet the "Gadget" view displays the data the way I
want it (except for the legend colors) with a static bottom "rule" or
line that measures from 0-500. When I set one of my values to "200"
and refresh the html live online I get a bottom line that is "220",
not 500. It seems to adjust by some formula no matter what the value.
What am I doing wrong?

Better yet. I just can't seem to find the tutorial that describes in
detail how to set up your spreadsheet to pass chart formatting info
like "Legend" or, if it's not done that way then how?

An appropriate tutorial link would be vastly, vastly appreciated.

Thanks in advance!

asgallant

unread,
Mar 27, 2012, 4:21:10 PM3/27/12
to google-visua...@googlegroups.com
You should be able to fix the hAxis to a range of 0-500 by using the hAxis.minValue and hAxis.maxValue options (eg, hAxis: {minValue: 0, maxValue: 500}).  Getting vertical lines on the bar chart is a tricky proposition, as there is no support for anything beyond the gridlines.  Gridline positions are auto-calculated, though, and all must be the same color, so I doubt they will serve for your purposes.  If you were referring to vertical bars, then what you want is a ColumnChart, not a BarChart.

I've never worked with the charts within Google spreadsheets, so I'm afraid I can't help you with the specifics involved in getting them to work right there.

Boulton Developer

unread,
Mar 27, 2012, 5:06:09 PM3/27/12
to Google Visualization API
Thanks for the quick reply!

"You should be able to fix the hAxis to a range of 0-500 by using the
hAxis.minValue and hAxis.maxValue options (eg, hAxis: {minValue: 0,
maxValue: 500}). "

With the spreadsheet "Gadget" you only have the option to enter
beginning and ending values for the horizontal axis in a form-type
interface. Nowhere is there a way apparent to me to add code
modifications. I have set those haxis values as 0 - 500 for certain.
My bottom line is still variable for some reason. I've deleted the
Gadget and started over and over again to verify that I did this. No
luck.

Don't need colors now, just what I've got: http://www.boultonweb.com/charts/
with a FIXED 0-500 value bottom line and NO LEGEND. I did check the
"No Legend" option for sure but it still shows up. Must be doing
something wrong in the way I am formatting my spreadsheet maybe?

My chart is SO basic and people have done wonderful things with these
charts, there must be a way to achieve these simple requirements with
the Bar Chart.

Thanks for your time.

Boulton Developer

unread,
Mar 27, 2012, 10:13:40 PM3/27/12
to Google Visualization API
This might make my question simpler. I want my dynamic chart to have a
last value of "500", independent of the dynamic values for "C-10-018"
and "C-10-019" like in the .png version of the chart generated by the
system shown in this url:

http://tinyurl.com/c2oqe6m

Like before, a suggestion about how to achieve this or a link to a
tutorial so I can figure it out myself would be so great. Can I use
the values from the spreadsheet but add formating rules to the
function after the object has been initialized maybe? Thanks for your
time and help!

-noob
Reply all
Reply to author
Forward
0 new messages