Skip to main content

Line Graph

<html>
  <head>
    <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
    <script type="text/javascript">
      google.charts.load('current', {'packages':['corechart']});
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Year', 'Cx. pipiense', 'Cx. erythrothorax','Cs. incidens', 'Ae. sierrensis', 'Cs. tarsalis', 'Ae. Washinoi'],
          ['Jan',   1,  2,  3, 4, 5, 6],
          ['Feb',   2,  2,  3, 4, 5, 6],
          ['March', 3,  2,  3, 4, 5, 6],
          ['April', 4,  2,  3, 4, 5, 6],
          ['May',   5,  2,  3, 4, 5, 6],
          ['June',  6,  2,  3, 4, 5, 6],
          ['July',  7,  2,  3, 4, 5, 6],
          ['Aug',   8,  2,  3, 4, 5, 6],
          ['Sept',  9,  2,  3, 4, 5, 6],
          ['Oct',  10,  2,  3, 4, 5, 6],
          ['Nov',  11,  2,  3, 4, 5, 6],
          ['Dec',  12,  2,  3, 4, 5, 6]
        ]);

        var options = {
          title: 'Average Number of....',
          curveType: 'function',
          legend: { position: 'side' },
          hAxis: {
          title: 'Month'},
        vAxis: {
          title: 'Number of Mosquitos'
        },
    
      };
        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));

        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="curve_chart" style="width: 100%; height: 500px"></div>
  </body>
</html>