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.

244 lines
9.0 KiB

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