Advertisement
GWibisono

morris 1

Apr 3rd, 2016
444
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.   <head>
  3.     <meta name="generator"
  4.    content="HTML Tidy for HTML5 (experimental) for Windows https://github.com/w3c/tidy-html5/tree/c63cc39" />
  5.     <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css" />
  6.     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
  7.     <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
  8.     <script src="http://cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
  9.     <title></title>
  10.   </head>
  11.   <body>
  12.     <div style="height: 250px;max-width:500px"><div  id="myfirstchart"></div></div>
  13.     <script>
  14. new Morris.Line({
  15.   // ID of the element in which to draw the chart.
  16.   element: 'myfirstchart',
  17.   // Chart data records -- each entry in this array corresponds to a point on
  18.   // the chart.
  19.   data: [
  20.     { year: '2005', value: 3564700000 },
  21.     { year: '2006', value: 6114000000 },
  22.     { year: '2007', value: 7888000000 },
  23.     { year: '2008', value: 5764700000 },
  24.     { year: '2009', value: 6614000000 },
  25.     { year: '2010', value: 6888000000 }
  26.   ],
  27.   // The name of the data record attribute that contains x-values.
  28.   xkey: 'year',
  29.   // A list of names of data record attributes that contain y-values.
  30.   ykeys: ['value'],
  31.   // Labels for the ykeys -- will be displayed when you hover over the
  32.   // chart.
  33.   labels: ['Value'],
  34. });
  35. </script>
  36.   </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement