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.

246 lines
11 KiB

9 years ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head><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>
  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.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. <link href="./css/examples.css" rel="stylesheet" type="text/css" />
  22. <style>
  23. img.example {
  24. height:150px;
  25. }
  26. </style>
  27. <script language="JavaScript">
  28. function loadVis() {
  29. var container = document.getElementById('visualization');
  30. var items = [
  31. {x: '2014-06-11', y: 10},
  32. {x: '2014-06-12', y: 25},
  33. {x: '2014-06-13', y: 30},
  34. {x: '2014-06-14', y: 10},
  35. {x: '2014-06-15', y: 15},
  36. {x: '2014-06-16', y: 30}
  37. ];
  38. var dataset = new vis.DataSet(items);
  39. var options = {
  40. start: '2014-06-10',
  41. end: '2014-06-18',
  42. height:'552px',
  43. clickToUse:true
  44. };
  45. var graph2d = new vis.Graph2d(container, dataset, options);
  46. }
  47. </script>
  48. </head>
  49. <body onload="prettyPrint(); loadVis();">
  50. <div class="navbar-wrapper">
  51. <div class="container">
  52. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  53. <div class="container">
  54. <div class="navbar-header">
  55. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  56. <span class="sr-only">Toggle navigation</span>
  57. <span class="icon-bar"></span>
  58. <span class="icon-bar"></span>
  59. <span class="icon-bar"></span>
  60. </button>
  61. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  62. </div>
  63. <div id="navbar" class="navbar-collapse collapse">
  64. <ul class="nav navbar-nav">
  65. <li class="active"><a href="./index.html#modules">Modules</a></li>
  66. <li><a href="./blog.html">Blog</a></li>
  67. <li><a href="./index.html#download_install">Download</a></li>
  68. <li><a href="./showcase/index.html">Showcase</a></li>
  69. <li><a href="./index.html#contribute">Contribute</a></li>
  70. <li><a href="./index.html#licenses">License</a></li>
  71. </ul>
  72. </div>
  73. </div>
  74. </nav>
  75. </div>
  76. </div>
  77. <div class="contentWrapper">
  78. <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/" role="button">View docs »</a>
  79. <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>
  80. <pre class="prettyprint lang-html">
  81. &lt;div id="visualization"&gt;&lt;/div&gt;
  82. &lt;script type="text/javascript"&gt;
  83. var container = document.getElementById('visualization');
  84. var items = [
  85. {x: '2014-06-11', y: 10},
  86. {x: '2014-06-12', y: 25},
  87. {x: '2014-06-13', y: 30},
  88. {x: '2014-06-14', y: 10},
  89. {x: '2014-06-15', y: 15},
  90. {x: '2014-06-16', y: 30}
  91. ];
  92. var dataset = new vis.DataSet(items);
  93. var options = {
  94. start: '2014-06-10',
  95. end: '2014-06-18'
  96. };
  97. var graph2d = new vis.Graph2d(container, dataset, options);
  98. &lt;/script&gt;
  99. </pre>
  100. <div id="visualization"></div>
  101. <h2 id="allExamples">All examples</h2>
  102. <div class="container-fluid">
  103. <div class="col-lg-2 col-md-3 col-sm-6">
  104. <a href="examples/graph2d/01_basic.html">
  105. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/1.png">
  106. <div class="exampleTitle">basic</div>
  107. </a>
  108. </div>
  109. <div class="col-lg-2 col-md-3 col-sm-6">
  110. <a href="examples/graph2d/02_bars.html">
  111. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/2.png">
  112. <div class="exampleTitle">bars</div>
  113. </a>
  114. </div>
  115. <div class="col-lg-2 col-md-3 col-sm-6">
  116. <a href="examples/graph2d/03_groups.html">
  117. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/3.png">
  118. <div class="exampleTitle">groups</div>
  119. </a>
  120. </div>
  121. <div class="col-lg-2 col-md-3 col-sm-6">
  122. <a href="examples/graph2d/04_rightAxis.html">
  123. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/4.png">
  124. <div class="exampleTitle">right axis</div>
  125. </a>
  126. </div>
  127. <div class="col-lg-2 col-md-3 col-sm-6">
  128. <a href="examples/graph2d/05_bothAxis.html">
  129. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/5.png">
  130. <div class="exampleTitle">both axis</div>
  131. </a>
  132. </div>
  133. <div class="col-lg-2 col-md-3 col-sm-6">
  134. <a href="examples/graph2d/06_interpolation.html">
  135. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/6.png">
  136. <div class="exampleTitle">interpolation</div>
  137. </a>
  138. </div>
  139. <div class="col-lg-2 col-md-3 col-sm-6">
  140. <a href="examples/graph2d/07_scrollingAndSorting.html">
  141. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/7.png">
  142. <div class="exampleTitle">scrolling and sorting</div>
  143. </a>
  144. </div>
  145. <div class="col-lg-2 col-md-3 col-sm-6">
  146. <a href="examples/graph2d/08_performance.html">
  147. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/8.png">
  148. <div class="exampleTitle">performance</div>
  149. </a>
  150. </div>
  151. <div class="col-lg-2 col-md-3 col-sm-6">
  152. <a href="examples/graph2d/09_external_legend.html">
  153. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/9.png">
  154. <div class="exampleTitle">external legend</div>
  155. </a>
  156. </div>
  157. <div class="col-lg-2 col-md-3 col-sm-6">
  158. <a href="examples/graph2d/10_barsSideBySide.html">
  159. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/10.png">
  160. <div class="exampleTitle">bars side by side</div>
  161. </a>
  162. </div>
  163. <div class="col-lg-2 col-md-3 col-sm-6">
  164. <a href="examples/graph2d/11_barsSideBySideGroups.html">
  165. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/11.png">
  166. <div class="exampleTitle">bars side by side groups</div>
  167. </a>
  168. </div>
  169. <div class="col-lg-2 col-md-3 col-sm-6">
  170. <a href="examples/graph2d/12_customRange.html">
  171. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/12.png">
  172. <div class="exampleTitle">custom range</div>
  173. </a>
  174. </div>
  175. <div class="col-lg-2 col-md-3 col-sm-6">
  176. <a href="examples/graph2d/13_localization.html">
  177. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/13.png">
  178. <div class="exampleTitle">localization</div>
  179. </a>
  180. </div>
  181. <div class="col-lg-2 col-md-3 col-sm-6">
  182. <a href="examples/graph2d/14_toggleGroups.html">
  183. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/14.png">
  184. <div class="exampleTitle">toggle groups</div>
  185. </a>
  186. </div>
  187. <div class="col-lg-2 col-md-3 col-sm-6">
  188. <a href="examples/graph2d/15_streaming_data.html">
  189. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/15.png">
  190. <div class="exampleTitle">streaming data</div>
  191. </a>
  192. </div>
  193. <div class="col-lg-2 col-md-3 col-sm-6">
  194. <a href="examples/graph2d/16_bothAxisTitles.html">
  195. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/16.png">
  196. <div class="exampleTitle">axis titles</div>
  197. </a>
  198. </div>
  199. <div class="col-lg-2 col-md-3 col-sm-6">
  200. <a href="examples/graph2d/17_dynamicStyling.html">
  201. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/17.png">
  202. <div class="exampleTitle">dynamic styling</div>
  203. </a>
  204. </div>
  205. <div class="col-lg-2 col-md-3 col-sm-6">
  206. <a href="examples/graph2d/18_scatterplot.html">
  207. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/18.png">
  208. <div class="exampleTitle">scatter plot</div>
  209. </a>
  210. </div>
  211. <div class="col-lg-2 col-md-3 col-sm-6">
  212. <a href="examples/graph2d/19_labels.html">
  213. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/19.png">
  214. <div class="exampleTitle">labels</div>
  215. </a>
  216. </div>
  217. <div class="col-lg-2 col-md-3 col-sm-6">
  218. <a href="examples/graph2d/20_shading.html">
  219. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/20.png">
  220. <div class="exampleTitle">shading</div>
  221. </a>
  222. </div>
  223. </div>
  224. <br />
  225. <br />
  226. <br />
  227. <br />
  228. </div>
  229. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  230. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  231. <!-- Include all compiled plugins (below), or include individual files as needed -->
  232. <script src="js/bootstrap.min.js"></script>
  233. </body>
  234. </html>