14

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

4

1 回答 1

24

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/

于 2013-11-22T16:47:27.677 回答