PHP/JavaScript webapp to analyse spending habits
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

graph-types.html 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Flot Examples</title>
  6. <link href="layout.css" rel="stylesheet" type="text/css"></link>
  7. <!--[if IE]><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. </head>
  11. <body>
  12. <h1>Flot Examples</h1>
  13. <div id="placeholder" style="width:600px;height:300px"></div>
  14. <p>Flot supports lines, points, filled areas, bars and any
  15. combinations of these, in the same plot and even on the same data
  16. series.</p>
  17. <script id="source" language="javascript" type="text/javascript">
  18. $(function () {
  19. var d1 = [];
  20. for (var i = 0; i < 14; i += 0.5)
  21. d1.push([i, Math.sin(i)]);
  22. var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
  23. var d3 = [];
  24. for (var i = 0; i < 14; i += 0.5)
  25. d3.push([i, Math.cos(i)]);
  26. var d4 = [];
  27. for (var i = 0; i < 14; i += 0.1)
  28. d4.push([i, Math.sqrt(i * 10)]);
  29. var d5 = [];
  30. for (var i = 0; i < 14; i += 0.5)
  31. d5.push([i, Math.sqrt(i)]);
  32. var d6 = [];
  33. for (var i = 0; i < 14; i += 0.5 + Math.random())
  34. d6.push([i, Math.sqrt(2*i + Math.sin(i) + 5)]);
  35. $.plot($("#placeholder"), [
  36. {
  37. data: d1,
  38. lines: { show: true, fill: true }
  39. },
  40. {
  41. data: d2,
  42. bars: { show: true }
  43. },
  44. {
  45. data: d3,
  46. points: { show: true }
  47. },
  48. {
  49. data: d4,
  50. lines: { show: true }
  51. },
  52. {
  53. data: d5,
  54. lines: { show: true },
  55. points: { show: true }
  56. },
  57. {
  58. data: d6,
  59. lines: { show: true, steps: true }
  60. }
  61. ]);
  62. });
  63. </script>
  64. </body>
  65. </html>