index.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Flot Examples: Basic Usage</title>
  6. <link href="../examples.css" rel="stylesheet" type="text/css">
  7. <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
  8. <script language="javascript" type="text/javascript" src="../../jquery.js"></script>
  9. <script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
  10. <script type="text/javascript">
  11. $(function() {
  12. var d1 = [];
  13. for (var i = 0; i < 14; i += 0.5) {
  14. d1.push([i, Math.sin(i)]);
  15. }
  16. var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
  17. // A null signifies separate line segments
  18. var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
  19. $.plot("#placeholder", [ d1, d2, d3 ]);
  20. // Add the Flot version string to the footer
  21. $("#footer").prepend("Flot " + $.plot.version + " &ndash; ");
  22. });
  23. </script>
  24. </head>
  25. <body>
  26. <div id="header">
  27. <h2>Basic Usage</h2>
  28. </div>
  29. <div id="content">
  30. <div class="demo-container">
  31. <div id="placeholder" class="demo-placeholder"></div>
  32. </div>
  33. <p>You don't have to do much to get an attractive plot. Create a placeholder, make sure it has dimensions (so Flot knows at what size to draw the plot), then call the plot function with your data.</p>
  34. <p>The axes are automatically scaled.</p>
  35. </div>
  36. <div id="footer">
  37. Copyright &copy; 2007 - 2013 IOLA and Ole Laursen
  38. </div>
  39. </body>
  40. </html>