That option is for the static Image Charts, you want to set the "isStacked"
option to true:
var options = {
title: '2012 Procurement Savings Goal: $2 Million',
hAxis: {
title: 'Procurement Area',
titleTextStyle: {
color: 'red'
}
},
isStacked: true
};
On Thursday, April 12, 2012 11:02:25 AM UTC-4, Coltrane wrote:
>
> 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.
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/NvXhSsf0ifsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.