Vertically stacked Google Bar Charts

MarkP picture MarkP · Nov 22, 2013 · Viewed 25.7k times · Source

I'm trying to produce a vertically stacked bar chart using the Google Charts API and I thought I had found the solution when I found the option:

isStacked: true

However, This seems to add the stacking horizontally (see link below) and I cant seem to find a way to do it. Anyone come across this before or can help me?

See: http://jsfiddle.net/tmA55/1/

Thanks

Answer

asgallant picture asgallant · Nov 22, 2013

Do you mean a vertically stacked ColumnChart?

Just change the chart from BarChart to ColumnChart:

new google.visualization.ColumnChart(document.getElementById('chart'))

http://jsfiddle.net/asgallant/tmA55/2/