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.

237 lines
8.6 KiB

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