Stepped Area Chart Example
An example of a Google Stepped Area Chart, with numeric domain, and type: category.
by dlaliberte
HTML
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
JavaScript
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Director (Year)', 'Rotten Tomatoes', 'IMDB'],
[0.5, 8.4, 7.9],
[1, 6.9, 6.5],
[2, 6.5, 6.4],
[2.5, 4.4, 6.2]
]);
var options = {
title: 'The decline of \'The 39 Steps\'',
hAxis: { type: 'category'},
vAxis: {title: 'Accumulated Rating'},
isStacked: true
};
var chart = new google.visualization.SteppedAreaChart(document.getElementById('chart_div'));
chart.draw(data, options);
}