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.

233 lines
8.4 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>Graph3d 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. // Create and populate a data table.
  69. var data = new vis.DataSet();
  70. // create some nice looking data with sin/cos
  71. var counter = 0;
  72. var steps = 50; // number of datapoints will be steps*steps
  73. var axisMax = 314;
  74. var axisStep = axisMax / steps;
  75. for (var x = 0; x < axisMax; x+=axisStep) {
  76. for (var y = 0; y < axisMax; y+=axisStep) {
  77. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  78. data.add({id:counter++,x:x,y:y,z:value,style:value});
  79. }
  80. }
  81. // specify options
  82. var options = {
  83. width: '500px',
  84. height: '552px',
  85. style: 'surface',
  86. showPerspective: true,
  87. showGrid: true,
  88. showShadow: false,
  89. keepAspectRatio: true,
  90. verticalRatio: 0.5
  91. };
  92. // Instantiate our graph object.
  93. var container = document.getElementById('visualization');
  94. var graph3d = new vis.Graph3d(container, data, options);
  95. }
  96. </script>
  97. </head>
  98. <body onload="prettyPrint(); loadVis();">
  99. <h1>Graph3d Examples</h1><a class="btn btn-default" href="#allExamples" role="button">View all examples »</a> <a class="btn btn-primary" href="./docs/graph3d.html" role="button">View docs »</a>
  100. <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>
  101. <pre class="prettyprint lang-html">
  102. &lt;div id="visualization"&gt;&lt;/div&gt;
  103. &lt;script type="text/javascript"&gt;
  104. // Create and populate a data table.
  105. var data = new vis.DataSet();
  106. // create some nice looking data with sin/cos
  107. var counter = 0;
  108. var steps = 50; // number of datapoints will be steps*steps
  109. var axisMax = 314;
  110. var axisStep = axisMax / steps;
  111. for (var x = 0; x < axisMax; x+=axisStep) {
  112. for (var y = 0; y < axisMax; y+=axisStep) {
  113. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  114. data.add({id:counter++,x:x,y:y,z:value,style:value});
  115. }
  116. }
  117. // specify options
  118. var options = {
  119. width: '500px',
  120. height: '552px',
  121. style: 'surface',
  122. showPerspective: true,
  123. showGrid: true,
  124. showShadow: false,
  125. keepAspectRatio: true,
  126. verticalRatio: 0.5
  127. };
  128. // Instantiate our graph object.
  129. var container = document.getElementById('visualization');
  130. var graph3d = new vis.Graph3d(container, data, options);
  131. &lt;/script&gt;
  132. </pre>
  133. <div id="visualization"></div>
  134. <h2 id="allExamples">All examples</h2>
  135. <div class="container-fluid">
  136. <div class="col-lg-2 col-md-3 col-sm-6">
  137. <a href="examples/graph3d/example01_basis.html">
  138. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/1.png">
  139. <div class="exampleTitle">basis</div>
  140. </a>
  141. </div>
  142. <div class="col-lg-2 col-md-3 col-sm-6">
  143. <a href="examples/graph3d/example02_camera.html">
  144. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/2.png">
  145. <div class="exampleTitle">camera</div>
  146. </a>
  147. </div>
  148. <div class="col-lg-2 col-md-3 col-sm-6">
  149. <a href="examples/graph3d/example03_filter.html">
  150. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/3.png">
  151. <div class="exampleTitle">filter</div>
  152. </a>
  153. </div>
  154. <div class="col-lg-2 col-md-3 col-sm-6">
  155. <a href="examples/graph3d/example04_animate.html">
  156. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/4.png">
  157. <div class="exampleTitle">animate</div>
  158. </a>
  159. </div>
  160. <div class="col-lg-2 col-md-3 col-sm-6">
  161. <a href="examples/graph3d/example05_line.html">
  162. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/5.png">
  163. <div class="exampleTitle">line</div>
  164. </a>
  165. </div>
  166. <div class="col-lg-2 col-md-3 col-sm-6">
  167. <a href="examples/graph3d/example06_moving_dots.html">
  168. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/6.png">
  169. <div class="exampleTitle">moving dots</div>
  170. </a>
  171. </div>
  172. <div class="col-lg-2 col-md-3 col-sm-6">
  173. <a href="examples/graph3d/example07_dot_cloud_colors.html">
  174. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/7.png">
  175. <div class="exampleTitle">dot cloud colors</div>
  176. </a>
  177. </div>
  178. <div class="col-lg-2 col-md-3 col-sm-6">
  179. <a href="examples/graph3d/example08_dot_cloud_size.html">
  180. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/8.png">
  181. <div class="exampleTitle">dot cloud size</div>
  182. </a>
  183. </div>
  184. <div class="col-lg-2 col-md-3 col-sm-6">
  185. <a href="examples/graph3d/example09_mobile.html">
  186. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/9.png">
  187. <div class="exampleTitle">mobile</div>
  188. </a>
  189. </div>
  190. <div class="col-lg-2 col-md-3 col-sm-6">
  191. <a href="examples/graph3d/example10_styles.html">
  192. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/10.png">
  193. <div class="exampleTitle">styles</div>
  194. </a>
  195. </div>
  196. <div class="col-lg-2 col-md-3 col-sm-6">
  197. <a href="examples/graph3d/example11_tooltips.html">
  198. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/11.png">
  199. <div class="exampleTitle">tooltips</div>
  200. </a>
  201. </div>
  202. <div class="col-lg-2 col-md-3 col-sm-6">
  203. <a href="examples/graph3d/playground/index.html">
  204. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/playground.png">
  205. <div class="exampleTitle">playground</div>
  206. </a>
  207. </div>
  208. </div>
  209. <br />
  210. <br />
  211. <br />
  212. <br />
  213. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  214. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  215. <!-- Include all compiled plugins (below), or include individual files as needed -->
  216. <script src="js/bootstrap.min.js"></script>
  217. </body>
  218. </html>