vis.js is a dynamic, browser-based visualization library
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.

91 lines
2.9 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>Timeline | Custom styling</title>
  5. <script src="../../dist/vis.js"></script>
  6. <link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
  7. <style type="text/css">
  8. .vis-timeline {
  9. border: 2px solid purple;
  10. font-family: purisa, 'comic sans', cursive;
  11. font-size: 12pt;
  12. background: #ffecea;
  13. }
  14. .vis-item {
  15. border-color: #F991A3;
  16. background-color: pink;
  17. font-size: 15pt;
  18. color: purple;
  19. box-shadow: 5px 5px 20px rgba(128,128,128, 0.5);
  20. }
  21. .vis-item,
  22. .vis-item.vis-line {
  23. border-width: 3px;
  24. }
  25. .vis-item.vis-dot {
  26. border-width: 10px;
  27. border-radius: 10px;
  28. }
  29. .vis-item.vis-selected {
  30. border-color: green;
  31. background-color: lightgreen;
  32. }
  33. .vis-time-axis .vis-text {
  34. color: purple;
  35. padding-top: 10px;
  36. padding-left: 10px;
  37. }
  38. .vis-time-axis .vis-text.vis-major {
  39. font-weight: bold;
  40. }
  41. .vis-time-axis .vis-grid.vis-minor {
  42. border-width: 2px;
  43. border-color: pink;
  44. }
  45. .vis-time-axis .vis-grid.vis-major {
  46. border-width: 2px;
  47. border-color: #F991A3;
  48. }
  49. </style>
  50. <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
  51. <body>
  52. <div id="visualization"></div>
  53. <script type="text/javascript">
  54. var container = document.getElementById('visualization');
  55. // note that months are zero-based in the JavaScript Date object
  56. var items = new vis.DataSet([
  57. {start: new Date(2010,7,23), content: '<div>Conversation</div><img src="img/community-users-icon.png" style="width:32px; height:32px;">'},
  58. {start: new Date(2010,7,23,23,0,0), content: '<div>Mail from boss</div><img src="img/mail-icon.png" style="width:32px; height:32px;">'},
  59. {start: new Date(2010,7,24,16,0,0), content: 'Report'},
  60. {start: new Date(2010,7,26), end: new Date(2010,8,2), content: 'Traject A'},
  61. {start: new Date(2010,7,28), content: '<div>Memo</div><img src="img/notes-edit-icon.png" style="width:48px; height:48px;">'},
  62. {start: new Date(2010,7,29), content: '<div>Phone call</div><img src="img/Hardware-Mobile-Phone-icon.png" style="width:32px; height:32px;">'},
  63. {start: new Date(2010,7,31), end: new Date(2010,8,3), content: 'Traject B'},
  64. {start: new Date(2010,8,4,12,0,0), content: '<div>Report</div><img src="img/attachment-icon.png" style="width:32px; height:32px;">'}
  65. ]);
  66. var options = {
  67. editable: true,
  68. margin: {
  69. item: 20,
  70. axis: 40
  71. }
  72. };
  73. var timeline = new vis.Timeline(container, items, options);
  74. </script>
  75. </body>
  76. </html>