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.

221 lines
9.2 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. <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. </style>
  24. <script language="JavaScript">
  25. function loadVis() {
  26. // Create and populate a data table.
  27. var data = new vis.DataSet();
  28. // create some nice looking data with sin/cos
  29. var counter = 0;
  30. var steps = 50; // number of datapoints will be steps*steps
  31. var axisMax = 314;
  32. var axisStep = axisMax / steps;
  33. for (var x = 0; x < axisMax; x+=axisStep) {
  34. for (var y = 0; y < axisMax; y+=axisStep) {
  35. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  36. data.add({id:counter++,x:x,y:y,z:value,style:value});
  37. }
  38. }
  39. // specify options
  40. var options = {
  41. width: '500px',
  42. height: '552px',
  43. style: 'surface',
  44. showPerspective: true,
  45. showGrid: true,
  46. showShadow: false,
  47. keepAspectRatio: true,
  48. verticalRatio: 0.5
  49. };
  50. // Instantiate our graph object.
  51. var container = document.getElementById('visualization');
  52. var graph3d = new vis.Graph3d(container, data, options);
  53. }
  54. </script>
  55. </head>
  56. <body onload="prettyPrint(); loadVis();">
  57. <div class="navbar-wrapper">
  58. <div class="container">
  59. <nav class="navbar navbar-inverse navbar-static-top" role="navigation">
  60. <div class="container">
  61. <div class="navbar-header">
  62. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  63. <span class="sr-only">Toggle navigation</span>
  64. <span class="icon-bar"></span>
  65. <span class="icon-bar"></span>
  66. <span class="icon-bar"></span>
  67. </button>
  68. <a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
  69. </div>
  70. <div id="navbar" class="navbar-collapse collapse">
  71. <ul class="nav navbar-nav">
  72. <li class="active"><a href="./index.html#modules">Modules</a></li>
  73. <li><a href="./docs/index.html" target="_blank">Documentation <img class="icon" src="./images/external-link-icons/external-link-icon-white.png"></a></li>
  74. <li><a href="./blog.html">Blog</a></li>
  75. <li><a href="./index.html#download_install">Download</a></li>
  76. <li><a data-scroll href="./showcase/index.html">Showcase</a></li>
  77. <li><a href="./index.html#contribute">Contribute</a></li>
  78. <li><a href="./featureRequests.html">Feature requests</a></li>
  79. <li><a href="./index.html#licenses">License</a></li>
  80. </ul>
  81. </div>
  82. </div>
  83. </nav>
  84. </div>
  85. </div>
  86. <div class="contentWrapper">
  87. <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>
  88. <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>
  89. <pre class="prettyprint lang-html">
  90. &lt;div id="visualization"&gt;&lt;/div&gt;
  91. &lt;script type="text/javascript"&gt;
  92. // Create and populate a data table.
  93. var data = new vis.DataSet();
  94. // create some nice looking data with sin/cos
  95. var counter = 0;
  96. var steps = 50; // number of datapoints will be steps*steps
  97. var axisMax = 314;
  98. var axisStep = axisMax / steps;
  99. for (var x = 0; x < axisMax; x+=axisStep) {
  100. for (var y = 0; y < axisMax; y+=axisStep) {
  101. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  102. data.add({id:counter++,x:x,y:y,z:value,style:value});
  103. }
  104. }
  105. // specify options
  106. var options = {
  107. width: '500px',
  108. height: '552px',
  109. style: 'surface',
  110. showPerspective: true,
  111. showGrid: true,
  112. showShadow: false,
  113. keepAspectRatio: true,
  114. verticalRatio: 0.5
  115. };
  116. // Instantiate our graph object.
  117. var container = document.getElementById('visualization');
  118. var graph3d = new vis.Graph3d(container, data, options);
  119. &lt;/script&gt;
  120. </pre>
  121. <div id="visualization"></div>
  122. <h2 id="allExamples">All examples</h2>
  123. <div class="container-fluid">
  124. <div class="col-lg-2 col-md-3 col-sm-6">
  125. <a href="examples/graph3d/example01_basis.html">
  126. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/1.png">
  127. <div class="exampleTitle">basis</div>
  128. </a>
  129. </div>
  130. <div class="col-lg-2 col-md-3 col-sm-6">
  131. <a href="examples/graph3d/example02_camera.html">
  132. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/2.png">
  133. <div class="exampleTitle">camera</div>
  134. </a>
  135. </div>
  136. <div class="col-lg-2 col-md-3 col-sm-6">
  137. <a href="examples/graph3d/example03_filter.html">
  138. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/3.png">
  139. <div class="exampleTitle">filter</div>
  140. </a>
  141. </div>
  142. <div class="col-lg-2 col-md-3 col-sm-6">
  143. <a href="examples/graph3d/example04_animate.html">
  144. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/4.png">
  145. <div class="exampleTitle">animate</div>
  146. </a>
  147. </div>
  148. <div class="col-lg-2 col-md-3 col-sm-6">
  149. <a href="examples/graph3d/example05_line.html">
  150. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/5.png">
  151. <div class="exampleTitle">line</div>
  152. </a>
  153. </div>
  154. <div class="col-lg-2 col-md-3 col-sm-6">
  155. <a href="examples/graph3d/example06_moving_dots.html">
  156. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/6.png">
  157. <div class="exampleTitle">moving dots</div>
  158. </a>
  159. </div>
  160. <div class="col-lg-2 col-md-3 col-sm-6">
  161. <a href="examples/graph3d/example07_dot_cloud_colors.html">
  162. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/7.png">
  163. <div class="exampleTitle">dot cloud colors</div>
  164. </a>
  165. </div>
  166. <div class="col-lg-2 col-md-3 col-sm-6">
  167. <a href="examples/graph3d/example08_dot_cloud_size.html">
  168. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/8.png">
  169. <div class="exampleTitle">dot cloud size</div>
  170. </a>
  171. </div>
  172. <div class="col-lg-2 col-md-3 col-sm-6">
  173. <a href="examples/graph3d/example09_mobile.html">
  174. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/9.png">
  175. <div class="exampleTitle">mobile</div>
  176. </a>
  177. </div>
  178. <div class="col-lg-2 col-md-3 col-sm-6">
  179. <a href="examples/graph3d/example10_styles.html">
  180. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/10.png">
  181. <div class="exampleTitle">styles</div>
  182. </a>
  183. </div>
  184. <div class="col-lg-2 col-md-3 col-sm-6">
  185. <a href="examples/graph3d/example11_tooltips.html">
  186. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/11.png">
  187. <div class="exampleTitle">tooltips</div>
  188. </a>
  189. </div>
  190. <div class="col-lg-2 col-md-3 col-sm-6">
  191. <a href="examples/graph3d/playground/index.html">
  192. <img class="example img-responsive" src="./images/exampleScreenshots/graph3d/playground.png">
  193. <div class="exampleTitle">playground</div>
  194. </a>
  195. </div>
  196. </div>
  197. <br />
  198. <br />
  199. <br />
  200. <br />
  201. </div>
  202. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  203. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  204. <!-- Include all compiled plugins (below), or include individual files as needed -->
  205. <script src="js/bootstrap.min.js"></script>
  206. </body>
  207. </html>