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.

240 lines
10 KiB

  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="./featureRequests.html">Feature requests</a></li>
  71. <li><a href="./index.html#licenses">License</a></li>
  72. </ul>
  73. </div>
  74. </div>
  75. </nav>
  76. </div>
  77. </div>
  78. <div class="contentWrapper">
  79. <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>
  80. <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>
  81. <pre class="prettyprint lang-html">
  82. &lt;div id="visualization"&gt;&lt;/div&gt;
  83. &lt;script type="text/javascript"&gt;
  84. var container = document.getElementById('visualization');
  85. var items = [
  86. {x: '2014-06-11', y: 10},
  87. {x: '2014-06-12', y: 25},
  88. {x: '2014-06-13', y: 30},
  89. {x: '2014-06-14', y: 10},
  90. {x: '2014-06-15', y: 15},
  91. {x: '2014-06-16', y: 30}
  92. ];
  93. var dataset = new vis.DataSet(items);
  94. var options = {
  95. start: '2014-06-10',
  96. end: '2014-06-18'
  97. };
  98. var graph2d = new vis.Graph2d(container, dataset, options);
  99. &lt;/script&gt;
  100. </pre>
  101. <div id="visualization"></div>
  102. <h2 id="allExamples">All examples</h2>
  103. <div class="container-fluid">
  104. <div class="col-lg-2 col-md-3 col-sm-6">
  105. <a href="examples/graph2d/01_basic.html">
  106. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/1.png">
  107. <div class="exampleTitle">basic</div>
  108. </a>
  109. </div>
  110. <div class="col-lg-2 col-md-3 col-sm-6">
  111. <a href="examples/graph2d/02_bars.html">
  112. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/2.png">
  113. <div class="exampleTitle">bars</div>
  114. </a>
  115. </div>
  116. <div class="col-lg-2 col-md-3 col-sm-6">
  117. <a href="examples/graph2d/03_groups.html">
  118. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/3.png">
  119. <div class="exampleTitle">groups</div>
  120. </a>
  121. </div>
  122. <div class="col-lg-2 col-md-3 col-sm-6">
  123. <a href="examples/graph2d/04_rightAxis.html">
  124. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/4.png">
  125. <div class="exampleTitle">right axis</div>
  126. </a>
  127. </div>
  128. <div class="col-lg-2 col-md-3 col-sm-6">
  129. <a href="examples/graph2d/05_bothAxis.html">
  130. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/5.png">
  131. <div class="exampleTitle">both axis</div>
  132. </a>
  133. </div>
  134. <div class="col-lg-2 col-md-3 col-sm-6">
  135. <a href="examples/graph2d/06_interpolation.html">
  136. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/6.png">
  137. <div class="exampleTitle">interpolation</div>
  138. </a>
  139. </div>
  140. <div class="col-lg-2 col-md-3 col-sm-6">
  141. <a href="examples/graph2d/07_scrollingAndSorting.html">
  142. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/7.png">
  143. <div class="exampleTitle">scrolling and sorting</div>
  144. </a>
  145. </div>
  146. <div class="col-lg-2 col-md-3 col-sm-6">
  147. <a href="examples/graph2d/08_performance.html">
  148. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/8.png">
  149. <div class="exampleTitle">performance</div>
  150. </a>
  151. </div>
  152. <div class="col-lg-2 col-md-3 col-sm-6">
  153. <a href="examples/graph2d/09_external_legend.html">
  154. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/9.png">
  155. <div class="exampleTitle">external legend</div>
  156. </a>
  157. </div>
  158. <div class="col-lg-2 col-md-3 col-sm-6">
  159. <a href="examples/graph2d/10_barsSideBySide.html">
  160. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/10.png">
  161. <div class="exampleTitle">bars side by side</div>
  162. </a>
  163. </div>
  164. <div class="col-lg-2 col-md-3 col-sm-6">
  165. <a href="examples/graph2d/11_barsSideBySideGroups.html">
  166. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/11.png">
  167. <div class="exampleTitle">bars side by side groups</div>
  168. </a>
  169. </div>
  170. <div class="col-lg-2 col-md-3 col-sm-6">
  171. <a href="examples/graph2d/12_customRange.html">
  172. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/12.png">
  173. <div class="exampleTitle">custom range</div>
  174. </a>
  175. </div>
  176. <div class="col-lg-2 col-md-3 col-sm-6">
  177. <a href="examples/graph2d/13_localization.html">
  178. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/13.png">
  179. <div class="exampleTitle">localization</div>
  180. </a>
  181. </div>
  182. <div class="col-lg-2 col-md-3 col-sm-6">
  183. <a href="examples/graph2d/14_toggleGroups.html">
  184. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/14.png">
  185. <div class="exampleTitle">toggle groups</div>
  186. </a>
  187. </div>
  188. <div class="col-lg-2 col-md-3 col-sm-6">
  189. <a href="examples/graph2d/15_streaming_data.html">
  190. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/15.png">
  191. <div class="exampleTitle">streaming data</div>
  192. </a>
  193. </div>
  194. <div class="col-lg-2 col-md-3 col-sm-6">
  195. <a href="examples/graph2d/16_bothAxis_titles.html">
  196. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/16.png">
  197. <div class="exampleTitle">axis titles</div>
  198. </a>
  199. </div>
  200. <div class="col-lg-2 col-md-3 col-sm-6">
  201. <a href="examples/graph2d/17_dynamicStyling.html">
  202. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/17.png">
  203. <div class="exampleTitle">dynamic styling</div>
  204. </a>
  205. </div>
  206. <div class="col-lg-2 col-md-3 col-sm-6">
  207. <a href="examples/graph2d/18_scatterplot.html">
  208. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/18.png">
  209. <div class="exampleTitle">scatter plot</div>
  210. </a>
  211. </div>
  212. <div class="col-lg-2 col-md-3 col-sm-6">
  213. <a href="examples/graph2d/19_labels.html">
  214. <img class="example img-responsive" src="./images/exampleScreenshots/graph2d/19.png">
  215. <div class="exampleTitle">labels</div>
  216. </a>
  217. </div>
  218. </div>
  219. <br />
  220. <br />
  221. <br />
  222. <br />
  223. </div>
  224. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  225. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  226. <!-- Include all compiled plugins (below), or include individual files as needed -->
  227. <script src="js/bootstrap.min.js"></script>
  228. </body>
  229. </html>