weeks.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <!doctype html>
  2. <head>
  3. <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
  4. <script src="http://cdnjs.cloudflare.com/ajax/libs/raphael/2.1.2/raphael-min.js"></script>
  5. <script src="../morris.js"></script>
  6. <script src="http://cdnjs.cloudflare.com/ajax/libs/prettify/r224/prettify.min.js"></script>
  7. <script src="lib/example.js"></script>
  8. <link rel="stylesheet" href="lib/example.css">
  9. <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/prettify/r224/prettify.min.css">
  10. <link rel="stylesheet" href="../morris.css">
  11. </head>
  12. <body>
  13. <h1>Formatting Dates With Weeks</h1>
  14. <div id="graph"></div>
  15. <pre id="code" class="prettyprint linenums">
  16. var week_data = [
  17. {"period": "2011 W27", "licensed": 3407, "sorned": 660},
  18. {"period": "2011 W26", "licensed": 3351, "sorned": 629},
  19. {"period": "2011 W25", "licensed": 3269, "sorned": 618},
  20. {"period": "2011 W24", "licensed": 3246, "sorned": 661},
  21. {"period": "2011 W23", "licensed": 3257, "sorned": 667},
  22. {"period": "2011 W22", "licensed": 3248, "sorned": 627},
  23. {"period": "2011 W21", "licensed": 3171, "sorned": 660},
  24. {"period": "2011 W20", "licensed": 3171, "sorned": 676},
  25. {"period": "2011 W19", "licensed": 3201, "sorned": 656},
  26. {"period": "2011 W18", "licensed": 3215, "sorned": 622},
  27. {"period": "2011 W17", "licensed": 3148, "sorned": 632},
  28. {"period": "2011 W16", "licensed": 3155, "sorned": 681},
  29. {"period": "2011 W15", "licensed": 3190, "sorned": 667},
  30. {"period": "2011 W14", "licensed": 3226, "sorned": 620},
  31. {"period": "2011 W13", "licensed": 3245, "sorned": null},
  32. {"period": "2011 W12", "licensed": 3289, "sorned": null},
  33. {"period": "2011 W11", "licensed": 3263, "sorned": null},
  34. {"period": "2011 W10", "licensed": 3189, "sorned": null},
  35. {"period": "2011 W09", "licensed": 3079, "sorned": null},
  36. {"period": "2011 W08", "licensed": 3085, "sorned": null},
  37. {"period": "2011 W07", "licensed": 3055, "sorned": null},
  38. {"period": "2011 W06", "licensed": 3063, "sorned": null},
  39. {"period": "2011 W05", "licensed": 2943, "sorned": null},
  40. {"period": "2011 W04", "licensed": 2806, "sorned": null},
  41. {"period": "2011 W03", "licensed": 2674, "sorned": null},
  42. {"period": "2011 W02", "licensed": 1702, "sorned": null},
  43. {"period": "2011 W01", "licensed": 1732, "sorned": null}
  44. ];
  45. Morris.Line({
  46. element: 'graph',
  47. data: week_data,
  48. xkey: 'period',
  49. ykeys: ['licensed', 'sorned'],
  50. labels: ['Licensed', 'SORN']
  51. });
  52. </pre>
  53. </body>