Stacked Bar Chart

865 views
Skip to first unread message

TheInnovator

unread,
Jul 16, 2013, 3:01:18 PM7/16/13
to google-visua...@googlegroups.com
Hi All, 

I need to create a chart like the combo below that shows a line drawn from one bar to another but I need it to be done in a Stacked char bar.

https://developers.google.com/chart/interactive/docs/gallery/combochart

I started but it did not work.  Here's what I have so far..

When changing the series for the line, it just changes the color of my bars.  Any ideas?  Thanks!

Jeremy Faller

unread,
Jul 17, 2013, 11:16:11 AM7/17/13
to google-visua...@googlegroups.com
Not sure I understand you, but as I parse your message, you have some data that you'd like to display in a combo chart of "stacked bar" and "line". If this is true, I think all you need to do is set the "isStacked" parameter to the combo chart example here, and you should be all set.

Isaac Sogunro

unread,
Jul 17, 2013, 12:58:08 PM7/17/13
to google-visua...@googlegroups.com
Hi Jeremy,

Thanks for the response.  Here's what I was trying to do...  http://jsfiddle.net/asgallant/GTpgA/4/

Maybe you can help me with the adding a second y-axis to my chart.
When I added the following to the 'Options', my chart did not render:

vAxes: { 
 0:{
          title: "Number of Sites", format: '#', 
          titleTextStyle:  {color: 'black', fontName: '"Arial"', fontSize: '16'},
          gridlines: {count: countVAxis, color: 'black'}},
 1: {title: "Cost", format: '#$'
         }}, 

Here it is in jsfiddle: http://jsfiddle.net/GTpgA/7/

Any ideas?

Thanks!


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/6guNndPk6xE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
-Isaac-

http://twitter.com/#!/feedy0urmind
You are today where your thoughts have brought you; you will be tomorrow where your thoughts take you.
- James Allen

asgallant

unread,
Jul 17, 2013, 2:15:43 PM7/17/13
to google-visua...@googlegroups.com
You didn't define the "countVAxis" variable, so the browser is throwing an error and halting execution.  Then, in order to get the second axis to draw, you need to assign at least one data series to that axis, like this: http://jsfiddle.net/asgallant/GTpgA/11/ 
To unsubscribe from this group and all its topics, send an email to google-visualization-api+unsub...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Isaac Sogunro

unread,
Jul 17, 2013, 4:51:54 PM7/17/13
to google-visua...@googlegroups.com
Thanks a lot...You are  life saver!


To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages