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.

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