I'm a newbie, so forgive me ignorance, but I'm attempting to convert a
standard bar chart I created based upon this code:
<html>
<head>
<script type="text/javascript" src="
https://www.google.com/
jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Area');
data.addColumn('number', 'Savings');
data.addRows([
['Building/Grounds', 10800],
['Equipment Services', 18754.08],
['Marketing Materials', 151999.58],
['Other', 46942.91],
['Raw Materials', 1118386],
['Office/Janitorial', 10480]
]);
var options = {
title: '2012 Procurement Savings Goal: $2 Million',
hAxis: {title: 'Procurement Area', titleTextStyle: {color:
'red'}}
};
var chart = new
google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
</body>
</html>
My user wants a vertical bar chart with stacked bar(s). I have found
the following code to select the chart type:
cht=bvs,
where and what syntax do I use to alter the chart type in the client
side code?
Thanks in advance.