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.

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