index.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: Symbols</title>
  6. <link href="../examples.css" rel="stylesheet" type="text/css">
  7. <script language="javascript" type="text/javascript" src="../../source/jquery.js"></script>
  8. <script language="javascript" type="text/javascript" src="../../source/jquery.canvaswrapper.js"></script>
  9. <script language="javascript" type="text/javascript" src="../../source/jquery.colorhelpers.js"></script>
  10. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.js"></script>
  11. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.saturated.js"></script>
  12. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.browser.js"></script>
  13. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.drawSeries.js"></script>
  14. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.errorbars.js"></script>
  15. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.uiConstants.js"></script>
  16. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.logaxis.js"></script>
  17. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.symbol.js"></script>
  18. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.flatdata.js"></script>
  19. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.navigate.js"></script>
  20. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.fillbetween.js"></script>
  21. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.stack.js"></script>
  22. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.touchNavigate.js"></script>
  23. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.hover.js"></script>
  24. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.touch.js"></script>
  25. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.time.js"></script>
  26. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.axislabels.js"></script>
  27. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.selection.js"></script>
  28. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.composeImages.js"></script>
  29. <script language="javascript" type="text/javascript" src="../../source/jquery.flot.legend.js"></script>
  30. <script type="text/javascript">
  31. $(function() {
  32. function generate(offset, amplitude) {
  33. var res = [];
  34. var start = 0, end = 10;
  35. for (var i = 0; i <= 50; ++i) {
  36. var x = start + i / 50 * (end - start);
  37. res.push([x, amplitude * Math.sin(x + offset)]);
  38. }
  39. return res;
  40. }
  41. var data = [
  42. { data: generate(2, 1.8), points: { symbol: "circle" } },
  43. { data: generate(3, 1.5), points: { symbol: "square" } },
  44. { data: generate(4, 0.9), points: { symbol: "diamond" } },
  45. { data: generate(6, 1.4), points: { symbol: "triangle" } },
  46. { data: generate(7, 1.1), points: { symbol: "cross" } },
  47. { data: generate(8, 1.0), points: { symbol: "ellipse" } },
  48. { data: generate(9, 1.3), points: { symbol: "plus" } }
  49. ];
  50. $.plot("#placeholder", data, {
  51. series: {
  52. points: {
  53. show: true,
  54. radius: 3,
  55. lineWidth: 2
  56. }
  57. },
  58. grid: {
  59. hoverable: true
  60. }
  61. });
  62. // Add the Flot version string to the footer
  63. $("#footer").prepend("Flot " + $.plot.version + " &ndash; ");
  64. });
  65. </script>
  66. </head>
  67. <body>
  68. <div id="header">
  69. <h2>Symbols</h2>
  70. </div>
  71. <div id="content">
  72. <div class="demo-container">
  73. <div id="placeholder" class="demo-placeholder"></div>
  74. </div>
  75. <p>Points can be marked in several ways, with circles being the built-in default. For other point types, you can define a callback function to draw the symbol. Some common symbols are available in the symbol plugin.</p>
  76. </div>
  77. <div id="footer">
  78. Copyright &copy; 2007 - 2014 IOLA and Ole Laursen
  79. </div>
  80. </body>
  81. </html>