Area Chart Example

An example of a Google Area Chart.

HTML

<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"></script>
       <div id="chart_div" style="width: 900px; height: 500px;"></div>

JavaScript

google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Année', 'Bus GNV', 'Bus Filtre à Particule', 'Bus total'],
['1998',  16,      0,120],
            ['1999',  22,      0,117],
            ['2000',  23,      0,116],
            ['2001',  30,      0,117],
            ['2002',  40,      0,119],
            ['2003',  46,      0,119],
            ['2004',  47,      9,120],
            ['2005',  49,      28,119],
            ['2006',  55,      28,121],
            ['2007',  61,      28,126],
            ['2008',  67,      28,124],
            ['2009',  68,      28,124],
            ['2010',  71,      28,127],
          ['2011',  71,      28,126],
          ['2012',  68,       27,123],
          ['2013',  65,      27,123]
        ]);

        var options = {
          title: 'Parc bus Vitalis',
          hAxis: {title: 'Year',  titleTextStyle: {color: '#333'}},
          vAxis: {minValue: 0}
        };

        var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }