答案 0 :(得分:1)
查看Google的代码Playground:
如果您在选项中添加“isStacked:true”,您将拥有堆积条。
只需将选项更改为:
// Create and draw the visualization.
new google.visualization.BarChart(document.getElementById('visualization')).
draw(data,
{title:"Yearly Coffee Consumption by Country",
width:600, height:400,
vAxis: {title: "Year"},
hAxis: {title: "Cups"},
isStacked: true}
);