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.

234 lines
8.5 KiB

10 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>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. font-family: Lustria,Georgia,Times,"Times New Roman",serif !important;
  24. }
  25. pre {
  26. width:450px;
  27. height:552px;
  28. overflow:auto;
  29. }
  30. #visualization {
  31. display:block;
  32. margin-left:470px;
  33. margin-top:-562px;
  34. width:500px;
  35. height:552px;
  36. border: 1px solid #dddddd;
  37. border-radius:4px;
  38. background-color:#fcfcfc;
  39. }
  40. div.textHTMLContent {
  41. margin-top:10px;
  42. margin-bottom:10px;
  43. display:block;
  44. width:800px;
  45. }
  46. img {
  47. border:1px solid #dddddd;
  48. width:250px;
  49. height:250px;
  50. border-radius:10px;
  51. margin-top:10px;
  52. }
  53. div.exampleTitle {
  54. position:relative;
  55. top:-7px;
  56. width:100%;
  57. max-width:250px;
  58. height:30px;
  59. background-color:#064880;
  60. color:#ffffff;
  61. text-align:center;
  62. vertical-align:middle;
  63. line-height: 30px;
  64. border-radius:10px;
  65. }
  66. </style>
  67. <script language="JavaScript">
  68. function loadVis() {
  69. // Create and populate a data table.
  70. var data = new vis.DataSet();
  71. // create some nice looking data with sin/cos
  72. var counter = 0;
  73. var steps = 50; // number of datapoints will be steps*steps
  74. var axisMax = 314;
  75. var axisStep = axisMax / steps;
  76. for (var x = 0; x < axisMax; x+=axisStep) {
  77. for (var y = 0; y < axisMax; y+=axisStep) {
  78. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  79. data.add({id:counter++,x:x,y:y,z:value,style:value});
  80. }
  81. }
  82. // specify options
  83. var options = {
  84. width: '500px',
  85. height: '552px',
  86. style: 'surface',
  87. showPerspective: true,
  88. showGrid: true,
  89. showShadow: false,
  90. keepAspectRatio: true,
  91. verticalRatio: 0.5
  92. };
  93. // Instantiate our graph object.
  94. var container = document.getElementById('visualization');
  95. var graph3d = new vis.Graph3d(container, data, options);
  96. }
  97. </script>
  98. </head>
  99. <body onload="prettyPrint(); loadVis();">
  100. <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>
  101. <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>
  102. <pre class="prettyprint lang-html">
  103. &lt;div id="visualization"&gt;&lt;/div&gt;
  104. &lt;script type="text/javascript"&gt;
  105. // Create and populate a data table.
  106. var data = new vis.DataSet();
  107. // create some nice looking data with sin/cos
  108. var counter = 0;
  109. var steps = 50; // number of datapoints will be steps*steps
  110. var axisMax = 314;
  111. var axisStep = axisMax / steps;
  112. for (var x = 0; x < axisMax; x+=axisStep) {
  113. for (var y = 0; y < axisMax; y+=axisStep) {
  114. var value = (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
  115. data.add({id:counter++,x:x,y:y,z:value,style:value});
  116. }
  117. }
  118. // specify options
  119. var options = {
  120. width: '500px',
  121. height: '552px',
  122. style: 'surface',
  123. showPerspective: true,
  124. showGrid: true,
  125. showShadow: false,
  126. keepAspectRatio: true,
  127. verticalRatio: 0.5
  128. };
  129. // Instantiate our graph object.
  130. var container = document.getElementById('visualization');
  131. var graph3d = new vis.Graph3d(container, data, options);
  132. &lt;/script&gt;
  133. </pre>
  134. <div id="visualization"></div>
  135. <h2 id="allExamples">All examples</h2>
  136. <div class="container-fluid">
  137. <div class="col-lg-2 col-md-3 col-sm-6">
  138. <a href="examples/graph3d/example01_basis.html">
  139. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/1.png">
  140. <div class="exampleTitle">basis</div>
  141. </a>
  142. </div>
  143. <div class="col-lg-2 col-md-3 col-sm-6">
  144. <a href="examples/graph3d/example02_camera.html">
  145. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/2.png">
  146. <div class="exampleTitle">camera</div>
  147. </a>
  148. </div>
  149. <div class="col-lg-2 col-md-3 col-sm-6">
  150. <a href="examples/graph3d/example03_filter.html">
  151. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/3.png">
  152. <div class="exampleTitle">filter</div>
  153. </a>
  154. </div>
  155. <div class="col-lg-2 col-md-3 col-sm-6">
  156. <a href="examples/graph3d/example04_animate.html">
  157. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/4.png">
  158. <div class="exampleTitle">animate</div>
  159. </a>
  160. </div>
  161. <div class="col-lg-2 col-md-3 col-sm-6">
  162. <a href="examples/graph3d/example05_line.html">
  163. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/5.png">
  164. <div class="exampleTitle">line</div>
  165. </a>
  166. </div>
  167. <div class="col-lg-2 col-md-3 col-sm-6">
  168. <a href="examples/graph3d/example06_moving_dots.html">
  169. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/6.png">
  170. <div class="exampleTitle">moving dots</div>
  171. </a>
  172. </div>
  173. <div class="col-lg-2 col-md-3 col-sm-6">
  174. <a href="examples/graph3d/example07_dot_cloud_colors.html">
  175. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/7.png">
  176. <div class="exampleTitle">dot cloud colors</div>
  177. </a>
  178. </div>
  179. <div class="col-lg-2 col-md-3 col-sm-6">
  180. <a href="examples/graph3d/example08_dot_cloud_size.html">
  181. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/8.png">
  182. <div class="exampleTitle">dot cloud size</div>
  183. </a>
  184. </div>
  185. <div class="col-lg-2 col-md-3 col-sm-6">
  186. <a href="examples/graph3d/example09_mobile.html">
  187. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/9.png">
  188. <div class="exampleTitle">mobile</div>
  189. </a>
  190. </div>
  191. <div class="col-lg-2 col-md-3 col-sm-6">
  192. <a href="examples/graph3d/example10_styles.html">
  193. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/10.png">
  194. <div class="exampleTitle">styles</div>
  195. </a>
  196. </div>
  197. <div class="col-lg-2 col-md-3 col-sm-6">
  198. <a href="examples/graph3d/example11_tooltips.html">
  199. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/11.png">
  200. <div class="exampleTitle">tooltips</div>
  201. </a>
  202. </div>
  203. <div class="col-lg-2 col-md-3 col-sm-6">
  204. <a href="examples/graph3d/playground/index.html">
  205. <img class="img-responsive" src="./images/exampleScreenshots/graph3d/playground.png">
  206. <div class="exampleTitle">playground</div>
  207. </a>
  208. </div>
  209. </div>
  210. <br />
  211. <br />
  212. <br />
  213. <br />
  214. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  215. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  216. <!-- Include all compiled plugins (below), or include individual files as needed -->
  217. <script src="js/bootstrap.min.js"></script>
  218. </body>
  219. </html>