The following code makes a horizontal stacked barchart that looks like this:
If I change the height attribute to 50 and the groupWidth to 40%, the legend disappears and the chart looks like this:
Question 1: How can I set the height of the bar and still show the legend?
Question 2: How can I get the horizontal and vertical axis to disappear?
What I am really trying to accomplish is a picture like this:
<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 = google.visualization.arrayToDataTable([
[' ', 'Sales', 'Expenses'],
[0 , 1000, 400],
]);
var options = {
isStacked: true,
width: 200,
height: 60,
vAxis: {gridlines: {count: 0}},
hAxis: {gridlines: {count: 0}},
bar: {groupWidth: "90%"},
legend: {position: 'top'}
};
var chart = new google.visualization.BarChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id="chart_div" ></div>
</body>
</html>