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.

239 lines
8.8 KiB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <title>Graph2d Examples</title>
  8. <!-- Bootstrap -->
  9. <link href="css/bootstrap.min.css" rel="stylesheet">
  10. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  11. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  12. <!--[if lt IE 9]>
  13. <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  14. <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  15. <![endif]-->
  16. <link href="./css/prettify.css" rel="stylesheet" type="text/css" />
  17. <script type="text/javascript" src="./js/prettify/prettify.js"></script>
  18. <script src="./dist/vis.js"></script>
  19. <link href="./dist/vis.css" rel="stylesheet" type="text/css" />
  20. <style>
  21. body {
  22. padding:10px;
  23. }
  24. pre {
  25. width:450px;
  26. height:552px;
  27. overflow:auto;
  28. }
  29. #visualization {
  30. display:block;
  31. margin-left:470px;
  32. margin-top:-562px;
  33. width:500px;
  34. height:552px;
  35. border: 1px solid #dddddd;
  36. border-radius:4px;
  37. background-color:#fcfcfc;
  38. }
  39. div.textHTMLContent {
  40. margin-top:10px;
  41. margin-bottom:10px;
  42. display:block;
  43. width:800px;
  44. }
  45. img {
  46. border:1px solid #dddddd;
  47. width:250px;
  48. height:250px;
  49. border-radius:10px;
  50. margin-top:10px;
  51. }
  52. div.exampleTitle {
  53. position:relative;
  54. top:-7px;
  55. width:100%;
  56. max-width:250px;
  57. height:30px;
  58. background-color:#064880;
  59. color:#ffffff;
  60. text-align:center;
  61. vertical-align:middle;
  62. line-height: 30px;
  63. border-radius:10px;
  64. }
  65. </style>
  66. <script language="JavaScript">
  67. function loadVis() {
  68. var container = document.getElementById('visualization');
  69. var items = [
  70. {x: '2014-06-11', y: 10},
  71. {x: '2014-06-12', y: 25},
  72. {x: '2014-06-13', y: 30},
  73. {x: '2014-06-14', y: 10},
  74. {x: '2014-06-15', y: 15},
  75. {x: '2014-06-16', y: 30}
  76. ];
  77. var dataset = new vis.DataSet(items);
  78. var options = {
  79. start: '2014-06-10',
  80. end: '2014-06-18',
  81. height:'552px',
  82. clickToUse:true
  83. };
  84. var graph2d = new vis.Graph2d(container, dataset, options);
  85. }
  86. </script>
  87. </head>
  88. <body onload="prettyPrint(); loadVis();">
  89. <h1>Graph2d Examples</h1><a class="btn btn-default" href="#allExamples" role="button">View all examples »</a> <a class="btn btn-primary" href="./docs/graph2d.html" role="button">View docs »</a>
  90. <div class="textHTMLContent">This small code example shows the easiest way to get a Graph2d up and running. This code has been taken from example 1. The working example is shown next to it. Click it to start the interaction.</div>
  91. <pre class="prettyprint lang-html">
  92. &lt;div id="visualization"&gt;&lt;/div&gt;
  93. &lt;script type="text/javascript"&gt;
  94. var container = document.getElementById('visualization');
  95. var items = [
  96. {x: '2014-06-11', y: 10},
  97. {x: '2014-06-12', y: 25},
  98. {x: '2014-06-13', y: 30},
  99. {x: '2014-06-14', y: 10},
  100. {x: '2014-06-15', y: 15},
  101. {x: '2014-06-16', y: 30}
  102. ];
  103. var dataset = new vis.DataSet(items);
  104. var options = {
  105. start: '2014-06-10',
  106. end: '2014-06-18'
  107. };
  108. var graph2d = new vis.Graph2d(container, dataset, options);
  109. &lt;/script&gt;
  110. </pre>
  111. <div id="visualization"></div>
  112. <h2 id="allExamples">All examples</h2>
  113. <div class="container-fluid">
  114. <div class="col-lg-2 col-md-3 col-sm-6">
  115. <a href="examples/graph2d/01_basic.html">
  116. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/1.png">
  117. <div class="exampleTitle">basic</div>
  118. </a>
  119. </div>
  120. <div class="col-lg-2 col-md-3 col-sm-6">
  121. <a href="examples/graph2d/02_bars.html">
  122. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/2.png">
  123. <div class="exampleTitle">bars</div>
  124. </a>
  125. </div>
  126. <div class="col-lg-2 col-md-3 col-sm-6">
  127. <a href="examples/graph2d/03_groups.html">
  128. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/3.png">
  129. <div class="exampleTitle">groups</div>
  130. </a>
  131. </div>
  132. <div class="col-lg-2 col-md-3 col-sm-6">
  133. <a href="examples/graph2d/04_rightAxis.html">
  134. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/4.png">
  135. <div class="exampleTitle">right axis</div>
  136. </a>
  137. </div>
  138. <div class="col-lg-2 col-md-3 col-sm-6">
  139. <a href="examples/graph2d/05_bothAxis.html">
  140. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/5.png">
  141. <div class="exampleTitle">both axis</div>
  142. </a>
  143. </div>
  144. <div class="col-lg-2 col-md-3 col-sm-6">
  145. <a href="examples/graph2d/06_interpolation.html">
  146. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/6.png">
  147. <div class="exampleTitle">interpolation</div>
  148. </a>
  149. </div>
  150. <div class="col-lg-2 col-md-3 col-sm-6">
  151. <a href="examples/graph2d/07_scrollingAndSorting.html">
  152. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/7.png">
  153. <div class="exampleTitle">scrolling and sorting</div>
  154. </a>
  155. </div>
  156. <div class="col-lg-2 col-md-3 col-sm-6">
  157. <a href="examples/graph2d/08_performance.html">
  158. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/8.png">
  159. <div class="exampleTitle">performance</div>
  160. </a>
  161. </div>
  162. <div class="col-lg-2 col-md-3 col-sm-6">
  163. <a href="examples/graph2d/09_external_legend.html">
  164. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/9.png">
  165. <div class="exampleTitle">external legend</div>
  166. </a>
  167. </div>
  168. <div class="col-lg-2 col-md-3 col-sm-6">
  169. <a href="examples/graph2d/10_barsSideBySide.html">
  170. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/10.png">
  171. <div class="exampleTitle">bars side by side</div>
  172. </a>
  173. </div>
  174. <div class="col-lg-2 col-md-3 col-sm-6">
  175. <a href="examples/graph2d/11_barsSideBySideGroups.html">
  176. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/11.png">
  177. <div class="exampleTitle">bars side by side groups</div>
  178. </a>
  179. </div>
  180. <div class="col-lg-2 col-md-3 col-sm-6">
  181. <a href="examples/graph2d/12_customRange.html">
  182. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/12.png">
  183. <div class="exampleTitle">custom range</div>
  184. </a>
  185. </div>
  186. <div class="col-lg-2 col-md-3 col-sm-6">
  187. <a href="examples/graph2d/13_localization.html">
  188. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/13.png">
  189. <div class="exampleTitle">localization</div>
  190. </a>
  191. </div>
  192. <div class="col-lg-2 col-md-3 col-sm-6">
  193. <a href="examples/graph2d/14_toggleGroups.html">
  194. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/14.png">
  195. <div class="exampleTitle">toggle groups</div>
  196. </a>
  197. </div>
  198. <div class="col-lg-2 col-md-3 col-sm-6">
  199. <a href="examples/graph2d/15_streaming_data.html">
  200. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/15.png">
  201. <div class="exampleTitle">streaming data</div>
  202. </a>
  203. </div>
  204. <div class="col-lg-2 col-md-3 col-sm-6">
  205. <a href="examples/graph2d/16_bothAxis_titles.html">
  206. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/16.png">
  207. <div class="exampleTitle">axis titles</div>
  208. </a>
  209. </div>
  210. <div class="col-lg-2 col-md-3 col-sm-6">
  211. <a href="examples/graph2d/17_dynamicStyling.html">
  212. <img class="img-responsive" src="./images/exampleScreenshots/graph2d/17.png">
  213. <div class="exampleTitle">dynamic styling</div>
  214. </a>
  215. </div>
  216. </div>
  217. <br />
  218. <br />
  219. <br />
  220. <br />
  221. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  222. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  223. <!-- Include all compiled plugins (below), or include individual files as needed -->
  224. <script src="js/bootstrap.min.js"></script>
  225. </body>
  226. </html>