Team:Virginia/Test

From 2014.igem.org

(Difference between revisions)
Line 3: Line 3:
     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
     <script type="text/javascript" src="https://www.google.com/jsapi"></script>
     <script type="text/javascript">
     <script type="text/javascript">
 +
      google.load("visualization", "1", {packages:["geochart"]});
 +
      google.setOnLoadCallback(drawRegionsMap);
 +
 +
      function drawRegionsMap() {
 +
 +
          var data = google.visualization.arrayToDataTable([
 +
              ['Region Code', 'Sub-Continent', 'Popularity'],
 +
              ['005', 'South America', 200],
 +
              ['154', 'Northern Europe', 150],
 +
              ['034', 'Southern Asia', 80],
 +
          ]);
 +
 +
          var options = {
 +
              resolution: 'subcontinents'
 +
          };
 +
 +
          var chart = new google.visualization.GeoChart(document.getElementById('regions_div'));
 +
 +
          chart.draw(data, options);
 +
      }
 +
    </script>
 +
 +
  <script type="text/javascript">
       google.load("visualization", "1", {packages:["geochart"]});
       google.load("visualization", "1", {packages:["geochart"]});
       google.setOnLoadCallback(drawRegionsMap);
       google.setOnLoadCallback(drawRegionsMap);

Revision as of 03:03, 16 October 2014