google.charts.load('current', {
packages: ['corechart']
}).then(function () {
var data = google.visualization.arrayToDataTable([
['Month', 'Bolivia', 'Ecuador', 'Madagascar', 'Average'],
['2019/01', 1, 2, 7, 3],
['2019/02', 5, 1, 3, 3.5],
['2019/03', 4, 3, 9, 6],
['2019/04', 1, 3, 8, 5],
['2019/05', 2, 6, 8, 4],
['2019/06', 3, 1, 9, 3],
]);
var options = {
chartArea: {
height: '100%',
width: '100%',
top: 48,
left: 48,
right: 16,
bottom: 48
},
height: '100%',
width: '100%',
title : 'Monthly Coffee Production by Country',
vAxis: {title: 'Cups'},
hAxis: {title: 'Month'},
seriesType: 'bars',
series: {3: {type: 'area'}}
};
var chart = new google.visualization.ComboChart(document.getElementById('chart'));
drawChart();
window.addEventListener('resize', drawChart, false);
function drawChart() {
chart.draw(data, options);
}
});
html, body {
height: 100%;
margin: 0px 0px 0px 0px;
overflow: hidden;
padding: 0px 0px 0px 0px;
}
#chart {
height: 100%;
}
<script src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart"></div>