Advertisement
Guest User

Untitled

a guest
Jul 4th, 2018
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.   <head>
  3.     <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
  4.     <script type="text/javascript">
  5.       google.charts.load("current", {packages:["corechart"]});
  6.       google.charts.setOnLoadCallback(drawChart);
  7.       function drawChart() {
  8.         var rawData = [
  9.           ['Dinosaur', 'Length'],
  10.           ['Acrocanthosaurus (top-spined lizard)', 12.2],
  11.           ['Albertosaurus (Alberta lizard)', 9.1],
  12.           ['Allosaurus (other lizard)', 12.2],
  13.           ['Apatosaurus (deceptive lizard)', 22.9],
  14.           ['Archaeopteryx (ancient wing)', 0.9],
  15.           ['Argentinosaurus (Argentina lizard)', 36.6],
  16.           ['Baryonyx (heavy claws)', 9.1],
  17.           ['Brachiosaurus (arm lizard)', 30.5],
  18.           ['Ceratosaurus (horned lizard)', 6.1],
  19.           ['Coelophysis (hollow form)', 2.7],
  20.           ['Compsognathus (elegant jaw)', 0.9],
  21.           ['Deinonychus (terrible claw)', 2.7],
  22.           ['Diplodocus (double beam)', 27.1],
  23.           ['Dromicelomimus (emu mimic)', 3.4],
  24.           ['Gallimimus (fowl mimic)', 5.5],
  25.           ['Mamenchisaurus (Mamenchi lizard)', 21.0],
  26.           ['Megalosaurus (big lizard)', 7.9],
  27.           ['Microvenator (small hunter)', 1.2],
  28.           ['Ornithomimus (bird mimic)', 4.6],
  29.           ['Oviraptor (egg robber)', 1.5],
  30.           ['Plateosaurus (flat lizard)', 7.9],
  31.           ['Sauronithoides (narrow-clawed lizard)', 2.0],
  32.           ['Seismosaurus (tremor lizard)', 45.7],
  33.           ['Spinosaurus (spiny lizard)', 12.2],
  34.           ['Supersaurus (super lizard)', 30.5],
  35.           ['Tyrannosaurus (tyrant lizard)', 15.2],
  36.           ['Ultrasaurus (ultra lizard)', 30.5],
  37.           ['Velociraptor (swift robber)', 1.8]]
  38.         var data = google.visualization.arrayToDataTable(rawData);
  39.  
  40.         var options = {
  41.           title: 'Lengths of dinosaurs, in meters',
  42.           legend: { position: 'none' },
  43.           histogram: { bucketSize: rawData.length / 10}
  44.         };
  45.  
  46.         var chart = new google.visualization.Histogram(document.getElementById('chart_div'));
  47.         chart.draw(data, options);
  48.       }
  49.     </script>
  50.   </head>
  51.   <body>
  52.     <div id="chart_div" style="width: 1200px; height: 500px;"></div>
  53.   </body>
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement