Area Chart Example
An example of a Google Area Chart.
HTML
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart_div" style="width: 100%; height: 500px;"></div>
JavaScript
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
[
{label: "year", type: "number", format: "none"},
{label: "performance 1", type: "number", format: "none"},
{label: "performance 2", type: "number", format: "none"},
],
["2008", 4, 7],
["2009", 10, 12],
["2010", 15, 18],
["2011", 3, 20],
["2012", 5, 4]
]);
var options = {
title:"Testing chart - column",
hAxis:{
format:"####",
title:"",
viewWindow:{
min:"2009"
},
showTextEvery:"1"
},
vAxis:{
title:""
},
colors: ["#805e59","#e6d2cf"]
};
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, options);
}