Browse Source

Refactored table columns "mid"

flowchartTest
jos 9 years ago
parent
commit
c131c084cc
26 changed files with 1827 additions and 1140 deletions
  1. +0
    -228
      docs/css/newdocs.css
  2. +83
    -0
      docs/css/old_style.css
  3. +164
    -55
      docs/css/style.css
  4. +1
    -1
      docs/dataset.html
  5. +1
    -1
      docs/dataview.html
  6. +210
    -211
      docs/graph2d/index.html
  7. +732
    -0
      docs/graph3d/index.html
  8. +2
    -2
      docs/index.html
  9. +12
    -12
      docs/network/configure.html
  10. +108
    -108
      docs/network/edges.html
  11. +10
    -10
      docs/network/groups.html
  12. +81
    -81
      docs/network/index.html
  13. +19
    -19
      docs/network/interaction.html
  14. +9
    -9
      docs/network/layout.html
  15. +12
    -12
      docs/network/manipulation.html
  16. +118
    -118
      docs/network/nodes.html
  17. +46
    -48
      docs/network/physics.html
  18. +4
    -4
      docs/old/graph3d.html
  19. +3
    -3
      docs/old/old_network/canvas.html
  20. +2
    -2
      docs/old/old_network/clustering.html
  21. +3
    -3
      docs/old/old_network/rendering.html
  22. +2
    -2
      docs/old/old_network/selection.html
  23. +2
    -2
      docs/old/old_network/view.html
  24. +201
    -207
      docs/timeline/index.html
  25. +1
    -1
      examples/index.html
  26. +1
    -1
      examples/timeline/index.html

+ 0
- 228
docs/css/newdocs.css View File

@ -1,228 +0,0 @@
html {
height:100%;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
/*font-family: Lustria, Georgia, Times, "Times New Roman", serif !important;*/
font-size:16px;
line-height: 1.5em;
background: url('../img/crosswordStrong.png') /* Background pattern from subtlepatterns.com */
}
h1, h2, h3, h4, h5, h6 {
margin: 40px 0 20px 0;
}
ul {
margin-top: 0.7em;
margin-bottom: 0.7em;
}
p {
margin: 20px 0;
}
img.icon {
position:relative;
top:-2px;
}
div.navbar-wrapper {
background-color:#07508E;
border-bottom: 3px solid #ffffff;
font-size:16px;
}
div.blogHeader {
margin-left:auto;
margin-right:auto;
text-align:center;
width:910px;
padding: 0px 30px 0px 30px;
margin-top:-150px;
color:#ffffff;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
margin-bottom:60px;
}
div.full {
min-height:100%;
box-shadow:0 2px 10px rgba(0,0,0,0.4);
padding: 20px 10px 40px 10px;
background-color:#ffffff;
}
@media (min-width: 768px) {
div.full {
padding: 40px 40px 80px 40px;
}
}
@media (min-width: 992px) {
div.full {
padding: 80px 80px 160px 80px;
}
}
table.moduleTable {
}
table.moduleTable th,
table.moduleTable td {
padding: 5px 15px;
border: 1px solid #dddddd;
}
table.moduleTable th {
background-color: #f5f5f5;
}
table.moduleTable td {
vertical-align: top;
}
/* TODO: cleanup */
/*tr.header {*/
/*color: #1f3350;*/
/*background-color: #cccccc;*/
/*border-bottom:1px solid #999999 !important;*/
/*font-size:16px;*/
/*font-style:italic;*/
/*}*/
td.mid {
background-color: #f5f5f5;
font-style:italic;
}
/*td.properties {*/
/*width:150px;*/
/*}*/
/*p {*/
/*max-width:1000px;*/
/*}*/
/*pre.code {*/
/*padding:2px 4px;*/
/*font-size:90%;*/
/*color: #444444;*/
/*background-color:#f9f2f4;*/
/*border-radius:4px;*/
/*border:0;*/
/*}*/
pre {
margin: 20px 0;
}
/*pre.top {*/
/*margin-left:20px;*/
/*}*/
tr.hidden {
max-height:0;
/*max-height: 0;*/
overflow: hidden;
}
tr.visible {
/* Set our transitions up. */
-webkit-animation:
fadeIn 250ms ease-in;
}
@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
span.caret {
opacity: 0.5;
}
span.right-caret {
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
border-left: 4px solid #000000;
display: inline-block;
height: 0;
opacity: 0.5;
vertical-align: top;
width: 0;
margin-left:5px;
margin-top:6px;
}
tr.toggle {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor:pointer;
}
tr.toggle.collapsible {
background-color: #f5f5f5;
border-left: 3px solid #89b3ff;
}
td.indent {
padding-left:25px !important;
}
td.indent2 {
padding-left:50px !important;
}
/* TODO: cleanup */
/*td.name {*/
/*width:230px;*/
/*}*/
/*td.nameSmall {*/
/*width:150px;*/
/*}*/
/*td.type {*/
/*width: 110px;*/
/*}*/
/*td.default {*/
/*width:60px;*/
/*}*/
/*td.eventProperties {*/
/*width:150px;*/
/*}*/
/*td.methodName {*/
/*width:250px;*/
/*}*/
pre.options {
max-width:600px;
}
pre.hidden {
display:none;
}

+ 83
- 0
docs/css/old_style.css View File

@ -0,0 +1,83 @@
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
body, td, th {
font-family: arial, sans-serif;
font-size: 11pt;
color: #4D4D4D;
line-height: 1.7em;
}
#container {
position: relative;
margin: 0 auto;
padding: 10px 10px 50px 10px;
width: 970px;
max-width: 100%;
box-sizing: border-box;
}
h1 {
font-size: 180%;
font-weight: bold;
padding: 0;
margin: 1em 0 1em 0;
}
h2 {
padding-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #e0e0e0;
color: #064880;
}
h3 {
font-size: 140%;
}
a > img {
border: none;
}
a {
color: #064880;
text-decoration: none;
}
a:visited {
color: #064880;
text-decoration: none;
}
a:hover {
color: red;
text-decoration: underline;
}
table {
border-collapse: collapse;
}
th {
font-weight: bold;
border: 1px solid lightgray;
background-color: #E5E5E5;
text-align: left;
vertical-align: top;
padding: 5px;
}
td {
border: 1px solid lightgray;
padding: 5px;
vertical-align: top;
}
p.important_note {
color: #3a6baa;
font-weight:bold;
}

+ 164
- 55
docs/css/style.css View File

@ -1,83 +1,192 @@
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
html {
height:100%;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
/*font-family: Lustria, Georgia, Times, "Times New Roman", serif !important;*/
font-size:16px;
line-height: 1.5em;
background: url('../img/crosswordStrong.png') /* Background pattern from subtlepatterns.com */
}
body, td, th {
font-family: arial, sans-serif;
font-size: 11pt;
color: #4D4D4D;
line-height: 1.7em;
h1, h2, h3, h4, h5, h6 {
margin: 40px 0 20px 0;
}
#container {
position: relative;
margin: 0 auto;
padding: 10px 10px 50px 10px;
width: 970px;
max-width: 100%;
box-sizing: border-box;
ul {
margin-top: 0.7em;
margin-bottom: 0.7em;
}
h1 {
font-size: 180%;
font-weight: bold;
padding: 0;
margin: 1em 0 1em 0;
p {
margin: 20px 0;
}
h2 {
padding-top: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #e0e0e0;
color: #064880;
img.icon {
position:relative;
top:-2px;
}
h3 {
font-size: 140%;
div.navbar-wrapper {
background-color:#07508E;
border-bottom: 3px solid #ffffff;
font-size:16px;
}
a > img {
border: none;
div.blogHeader {
margin-left:auto;
margin-right:auto;
text-align:center;
width:910px;
padding: 0px 30px 0px 30px;
margin-top:-150px;
color:#ffffff;
text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
margin-bottom:60px;
}
a {
color: #064880;
text-decoration: none;
div.full {
min-height:100%;
box-shadow:0 2px 10px rgba(0,0,0,0.4);
padding: 20px 10px 40px 10px;
background-color:#ffffff;
}
a:visited {
color: #064880;
text-decoration: none;
@media (min-width: 768px) {
div.full {
padding: 40px 40px 80px 40px;
}
}
a:hover {
color: red;
text-decoration: underline;
@media (min-width: 992px) {
div.full {
padding: 80px 80px 160px 80px;
}
}
table {
border-collapse: collapse;
}
th {
font-weight: bold;
border: 1px solid lightgray;
background-color: #E5E5E5;
text-align: left;
vertical-align: top;
padding: 5px;
table th,
table td {
padding: 5px 15px;
border: 1px solid #dddddd;
}
table th {
background-color: #f5f5f5;
}
table td {
vertical-align: top;
}
/*
The following tables are used:
- A table 'properties' with data properties. Columns: Name, Type, Required, Description
- A table 'options' with configuration options. Columns: Name, Type, Default, Description
- A table 'methods' with methods. Columns: Method, Return Type, Description
- A table 'events' with events. Columns: Name, Properties, Description
- A table 'styles' with styles. Columns: Description, Values
*/
table.properties td:nth-child(2),
table.properties td:nth-child(3),
table.options td:nth-child(2),
table.options td:nth-child(3),
table.methods td:nth-child(2),
table.methods td:nth-child(2),
table.events td:nth-child(2) {
background-color: #f5f5f5;
font-style: italic;
}
pre {
margin: 20px 0;
}
a code {
text-decoration: underline;
}
/*pre.top {*/
/*margin-left:20px;*/
/*}*/
tr.hidden {
max-height:0;
/*max-height: 0;*/
overflow: hidden;
}
tr.visible {
/* Set our transitions up. */
-webkit-animation:
fadeIn 250ms ease-in;
}
@-webkit-keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
span.caret {
opacity: 0.5;
}
span.right-caret {
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
border-left: 4px solid #000000;
display: inline-block;
height: 0;
opacity: 0.5;
vertical-align: top;
width: 0;
margin-left:5px;
margin-top:6px;
}
tr.toggle {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor:pointer;
}
tr.toggle.collapsible {
background-color: #f5f5f5;
border-left: 3px solid #89b3ff;
}
td.indent {
padding-left:25px !important;
}
td.indent2 {
padding-left:50px !important;
}
td {
border: 1px solid lightgray;
padding: 5px;
vertical-align: top;
pre.options {
max-width:600px;
}
p.important_note {
color: #3a6baa;
font-weight:bold;
pre.hidden {
display:none;
}

+ 1
- 1
docs/dataset.html View File

@ -5,7 +5,7 @@
<title>vis.js | DataSet documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>

+ 1
- 1
docs/dataview.html View File

@ -5,7 +5,7 @@
<title>vis.js | DataView documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>

+ 210
- 211
docs/graph2d/index.html
File diff suppressed because it is too large
View File


+ 732
- 0
docs/graph3d/index.html View File

@ -0,0 +1,732 @@
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" HREF="favicon.ico">
<title>graph3d - vis.js - A dynamic, browser based visualization library.</title>
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
<script type="text/javascript" src="../js/prettify/prettify.js"></script>
<script src="../js/smooth-scroll.min.js"></script>
<script language="JavaScript">
smoothScroll.init();
</script>
<script type="text/javascript" src="../js/toggleTable.js"></script>
</head>
<body onload="prettyPrint();">
<div class="navbar-wrapper">
<div class="container">
<nav class="navbar navbar-inverse navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand hidden-sm" href="./index.html">vis.js</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="http://www.visjs.org/index.html#modules">Modules</a></li>
<li class="active"><a href="./docs/index.html" target="_blank">Documentation <img class="icon"
src="../img/external-link-icons/external-link-icon-white.png"></a>
</li>
<li><a href="http://www.visjs.org/blog.html">Blog</a></li>
<li><a href="http://www.visjs.org/index.html#download_install">Download</a></li>
<li><a href="http://www.visjs.org/showcase/index.html">Showcase</a></li>
<li><a href="http://www.visjs.org/index.html#contribute">Contribute</a></li>
<li><a href="http://www.visjs.org/featureRequests.html">Feature requests</a></li>
<li><a href="http://www.visjs.org/index.html#licenses">License</a></li>
</ul>
</div>
</div>
</nav>
</div>
</div>
<a href="https://github.com/almende/vis" class="hidden-xs hidden-sm hidden-md"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a>
<div class="container full">
<h1>Graph3d</h1>
<h2 id="Overview">Overview</h2>
<p>
Graph3d is an interactive visualization chart to draw data in a three dimensional
graph. You can freely move and zoom in the graph by dragging and scrolling in the
window. Graph3d also supports animation of a graph.
</p>
<p>
Graph3d uses <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Canvas">HTML canvas</a>
to render graphs, and can render up to a few thousands of data points smoothly.
</p>
<h2 id="Contents">Contents</h2>
<ul>
<li><a href="#Overview">Overview</a></li>
<li><a href="#Loading">Loading</a></li>
<li><a href="#Data_Format">Data Format</a></li>
<li><a href="#Configuration_Options">Configuration Options</a></li>
<li><a href="#Methods">Methods</a></li>
<li><a href="#Events">Events</a></li>
<li><a href="#Data_Policy">Data Policy</a></li>
</ul>
<h2 id="Example">Example</h2>
<p>
The following code shows how to create a Graph3d and provide it with data.
More examples can be found in the <a href="../examples">examples</a> directory.
</p>
<pre class="prettyprint lang-html">
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Graph 3D demo&lt;/title&gt;
&lt;style&gt;
body {font: 10pt arial;}
&lt;/style&gt;
&lt;script type="text/javascript" src="../../dist/vis.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
var data = null;
var graph = null;
function custom(x, y) {
return (Math.sin(x/50) * Math.cos(y/50) * 50 + 50);
}
// Called when the Visualization API is loaded.
function drawVisualization() {
// Create and populate a data table.
var data = new vis.DataSet();
// create some nice looking data with sin/cos
var steps = 50; // number of datapoints will be steps*steps
var axisMax = 314;
var axisStep = axisMax / steps;
for (var x = 0; x &lt; axisMax; x+=axisStep) {
for (var y = 0; y &lt; axisMax; y+=axisStep) {
var value = custom(x, y);
data.add({
x: x,
y: y,
z: value,
style: value
});
}
}
// specify options
var options = {
width: '600px',
height: '600px',
style: 'surface',
showPerspective: true,
showGrid: true,
showShadow: false,
keepAspectRatio: true,
verticalRatio: 0.5
};
// create a graph3d
var container = document.getElementById('mygraph');
graph3d = new vis.Graph3d(container, data, options);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="drawVisualization();"&gt;
&lt;div id="mygraph"&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<h2 id="Loading">Loading</h2>
<p>
The class name of the Graph3d is <code>vis.Graph3d</code>.
When constructing a Graph3d, an HTML DOM container must be provided to attach
the graph to. Optionally, data an options can be provided.
Data is a vis <code>DataSet</code> or an <code>Array</code>, described in
section <a href="#Data_Format">Data Format</a>.
Options is a name-value map in the JSON format. The available options
are described in section <a href="#Configuration_Options">Configuration Options</a>.
</p>
<pre class="prettyprint lang-js">var graph = new vis.Graph3d(container [, data] [, options]);</pre>
<p>
Data and options can be set or changed later on using the functions
<code>Graph3d.setData(data)</code> and <code>Graph3d.setOptions(options)</code>.
</p>
<h2 id="Data_Format">Data Format</h2>
<p>
Graph3d can load data from an <code>Array</code>, a <code>DataSet</code> or a <code>DataView</code>.
JSON objects are added to this DataSet by using the <code>add()</code> function.
Data points must have properties <code>x</code>, <code>y</code>, and <code>z</code>,
and can optionally have a property <code>style</code> and <code>filter</code>.
<h3>Definition</h3>
<p>
The DataSet JSON objects are defined as:
</p>
<table class="properties">
<tr>
<th>Name</th>
<th>Type</th>
<th>Required</th>
<th>Description</th>
</tr>
<tr>
<td>x</td>
<td>number</td>
<td>yes</td>
<td>Location on the x-axis.</td>
</tr>
<tr>
<td>y</td>
<td>number</td>
<td>yes</td>
<td>Location on the y-axis.</td>
</tr>
<tr>
<td>z</td>
<td>number</td>
<td>yes</td>
<td>Location on the z-axis.</td>
</tr>
<tr>
<td>style</td>
<td>number</td>
<td>no</td>
<td>The data value, required for graph styles <code>dot-color</code> and
<code>dot-size</code>.
</td>
</tr>
<tr>
<td>filter</td>
<td>*</td>
<td>no</td>
<td>Filter values used for the animation.
This column may have any type, such as a number, string, or Date.</td>
</tr>
</table>
<h2 id="Configuration_Options">Configuration Options</h2>
<p>
Options can be used to customize the graph. Options are defined as a JSON object.
All options are optional.
</p>
<pre class="prettyprint lang-js">
var options = {
width: '100%',
height: '400px',
style: 'surface'
};
</pre>
<p>
The following options are available.
</p>
<table class="options">
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>animationInterval</td>
<td>number</td>
<td>1000</td>
<td>The animation interval in milliseconds. This determines how fast
the animation runs.</td>
</tr>
<tr>
<td>animationPreload</td>
<td>boolean</td>
<td>false</td>
<td>If false, the animation frames are loaded as soon as they are requested.
if <code>animationPreload</code> is true, the graph will automatically load
all frames in the background, resulting in a smoother animation as soon as
all frames are loaded. The load progress is shown on screen.</td>
</tr>
<tr>
<td>animationAutoStart</td>
<td>boolean</td>
<td>false</td>
<td>If true, the animation starts playing automatically after the graph
is created.</td>
</tr>
<tr>
<td>backgroundColor</td>
<td>string or Object</td>
<td>'white'</td>
<td>The background color for the main area of the chart.
Can be either a simple HTML color string, for example: 'red' or '#00cc00',
or an object with the following properties.</td>
</tr>
<tr>
<td>backgroundColor.stroke</td>
<td>string</td>
<td>'gray'</td>
<td>The color of the chart border, as an HTML color string.</td>
</tr>
<tr>
<td>backgroundColor.strokeWidth</td>
<td>number</td>
<td>1</td>
<td>The border width, in pixels.</td>
</tr>
<tr>
<td>backgroundColor.fill</td>
<td>string</td>
<td>'white'</td>
<td>The chart fill color, as an HTML color string.</td>
</tr>
<tr>
<td>cameraPosition</td>
<td>Object</td>
<td>{horizontal:&nbsp;1.0, vertical:&nbsp;0.5, distance:&nbsp;1.7}</td>
<td>Set the initial rotation and position of the camera.
The object <code>cameraPosition</code> contains three parameters:
<code>horizontal</code>, <code>vertical</code>, and <code>distance</code>.
Parameter <code>horizontal</code> is a value in radians and can have any
value (but normally in the range of 0 and 2*Pi).
Parameter <code>vertical</code> is a value in radians between 0 and 0.5*Pi.
Parameter <code>distance</code> is the (normalized) distance from the
camera to the center of the graph, in the range of 0.71 to 5.0. A
larger distance puts the graph further away, making it smaller.
All parameters are optional.
</tr>
<tr>
<td>height</td>
<td>string</td>
<td>'400px'</td>
<td>The height of the graph in pixels or as a percentage.</td>
</tr>
<tr>
<td>keepAspectRatio</td>
<td>boolean</td>
<td>true</td>
<td>If <code>keepAspectRatio</code> is true, the x-axis and the y-axis
keep their aspect ratio. If false, the axes are scaled such that they
both have the same, maximum with.</td>
</tr>
<tr>
<td>showAnimationControls</td>
<td>boolean</td>
<td>true</td>
<td>If true, animation controls are created at the bottom of the Graph.
The animation controls consists of buttons previous, start/stop, next,
and a slider showing the current frame.
Only applicable when the provided data contains an animation.</td>
</tr>
<tr>
<td>showGrid</td>
<td>boolean</td>
<td>true</td>
<td>If true, grid lines are draw in the x-y surface (the bottom of the 3d
graph).</td>
</tr>
<tr>
<td>showPerspective</td>
<td>boolean</td>
<td>true</td>
<td>If true, the graph is drawn in perspective: points and lines which
are further away are drawn smaller.
Note that the graph currently does not support a gray colored bottom side
when drawn in perspective.
</td>
</tr>
<tr>
<td>showShadow</td>
<td>boolean</td>
<td>false</td>
<td>Show shadow on the graph.</td>
</tr>
<tr>
<td>style</td>
<td>string</td>
<td>'dot'</td>
<td>The style of the 3d graph. Available styles:
<code>bar</code>,
<code>bar-color</code>,
<code>bar-size</code>,
<code>dot</code>,
<code>dot-line</code>,
<code>dot-color</code>,
<code>dot-size</code>,
<code>line</code>,
<code>grid</code>,
or <code>surface</code></td>
</tr>
<tr>
<td>tooltip</td>
<td>boolean | function</td>
<td>false</td>
<td>Show a tooltip showing the values of the hovered data point.
The contents of the tooltip can be customized by providing a callback
function as <code>tooltip</code>. In this case the function is called
with an object containing parameters <code>x</code>,
<code>y</code>, and <code>z</code> argument,
and must return a string which may contain HTML.
</td>
</tr>
<tr>
<td>valueMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the value-axis. Only available in combination
with the styles <code>dot-color</code> and <code>dot-size</code>.</td>
</tr>
<tr>
<td>valueMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the value-axis. Only available in combination
with the styles <code>dot-color</code> and <code>dot-size</code>.</td>
</tr>
<tr>
<td>verticalRatio</td>
<td>number</td>
<td>0.5</td>
<td>A value between 0.1 and 1.0. This scales the vertical size of the graph
When keepAspectRatio is set to false, and verticalRatio is set to 1.0,
the graph will be a cube.</td>
</tr>
<tr>
<td>width</td>
<td>string</td>
<td>'400px'</td>
<td>The width of the graph in pixels or as a percentage.</td>
</tr>
<tr>
<td>xBarWidth</td>
<td>number</td>
<td>none</td>
<td>The width of bars in x direction. By default, the width is equal to the distance
between the data points, such that bars adjoin each other.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
<tr>
<td>xCenter</td>
<td>string</td>
<td>'55%'</td>
<td>The horizontal center position of the graph, as a percentage or in
pixels.</td>
</tr>
<tr>
<td>xMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the x-axis.</td>
</tr>
<tr>
<td>xMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the x-axis.</td>
</tr>
<tr>
<td>xStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the x-axis.</td>
</tr>
<tr>
<td>xValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the x-axis,
for example <code>function (x) {return (x * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>yBarWidth</td>
<td>number</td>
<td>none</td>
<td>The width of bars in y direction. By default, the width is equal to the distance
between the data points, such that bars adjoin each other.
Only applicable for styles <code>'bar'</code> and <code>'bar-color'</code>.</td>
</tr>
<tr>
<td>yCenter</td>
<td>string</td>
<td>'45%'</td>
<td>The vertical center position of the graph, as a percentage or in
pixels.</td>
</tr>
<tr>
<td>yMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the y-axis.</td>
</tr>
<tr>
<td>yMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the y-axis.</td>
</tr>
<tr>
<td>yStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the y-axis.</td>
</tr>
<tr>
<td>yValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the y-axis,
for example <code>function (y) {return (y * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>zMin</td>
<td>number</td>
<td>none</td>
<td>The minimum value for the z-axis.</td>
</tr>
<tr>
<td>zMax</td>
<td>number</td>
<td>none</td>
<td>The maximum value for the z-axis.</td>
</tr>
<tr>
<td>zStep</td>
<td>number</td>
<td>none</td>
<td>Step size for the grid on the z-axis.</td>
</tr>
<tr>
<td>zValueLabel</td>
<td>function</td>
<td>none</td>
<td>A function for custom formatting of the labels along the z-axis,
for example <code>function (z) {return (z * 100) + '%'}</code>.
</td>
</tr>
<tr>
<td>xLabel</td>
<td>String</td>
<td>x</td>
<td>Label on the X axis.</td>
</tr>
<tr>
<td>yLabel</td>
<td>String</td>
<td>y</td>
<td>Label on the Y axis.</td>
</tr>
<tr>
<td>zLabel</td>
<td>String</td>
<td>z</td>
<td>Label on the Z axis.</td>
</tr>
<tr>
<td>filterLabel</td>
<td>String</td>
<td>time</td>
<td>Label for the filter column.</td>
</tr>
<tr>
<td>legendLabel</td>
<td>String</td>
<td>value</td>
<td>Label for the style description.</td>
</tr>
</table>
<h2 id="Methods">Methods</h2>
<p>
Graph3d supports the following methods.
</p>
<table class="methods">
<tr>
<th>Method</th>
<th>Return Type</th>
<th>Description</th>
</tr>
<tr>
<td>animationStart()</td>
<td>none</td>
<td>Start playing the animation.
Only applicable when animation data is available.</td>
</tr>
<tr>
<td>animationStop()</td>
<td>none</td>
<td>Stop playing the animation.
Only applicable when animation data is available.</td>
</tr>
<tr>
<td>getCameraPosition()</td>
<td>An object with parameters <code>horizontal</code>,
<code>vertical</code> and <code>distance</code></td>
<td>Returns an object with parameters <code>horizontal</code>,
<code>vertical</code> and <code>distance</code>,
which each one of them is a number, representing the rotation and position
of the camera.</td>
</tr>
<tr>
<td>redraw()</td>
<td>none</td>
<td>Redraw the graph. Useful after the camera position is changed externally,
when data is changed, or when the layout of the webpage changed.</td>
</tr>
<tr>
<td>setData(data)</td>
<td>none</td>
<td>Replace the data in the Graph3d.</td>
</tr>
<tr>
<td>setOptions(options)</td>
<td>none</td>
<td>Update options of Graph3d.
The provided options will be merged with current options.</td>
</tr>
<tr>
<td>setSize(width, height)</td>
<td>none</td>
<td>Parameters <code>width</code> and <code>height</code> are strings,
containing a new size for the graph. Size can be provided in pixels
or in percentages.</td>
</tr>
<tr>
<td>setCameraPosition (pos)</td>
<td>{horizontal:&nbsp;1.0, vertical:&nbsp;0.5, distance:&nbsp;1.7}</td>
<td>Set the rotation and position of the camera. Parameter <code>pos</code>
is an object which contains three parameters: <code>horizontal</code>,
<code>vertical</code>, and <code>distance</code>.
Parameter <code>horizontal</code> is a value in radians and can have any
value (but normally in the range of 0 and 2*Pi).
Parameter <code>vertical</code> is a value in radians between 0 and 0.5*Pi.
Parameter <code>distance</code> is the (normalized) distance from the
camera to the center of the graph, in the range of 0.71 to 5.0. A
larger distance puts the graph further away, making it smaller.
All parameters are optional.
</td>
</tr>
</table>
<h2 id="Events">Events</h2>
<p>
Graph3d fires events after the camera position has been changed.
The event can be catched by creating a listener.
Here an example on how to catch a <code>cameraPositionChange</code> event.
</p>
<pre class="prettyprint lang-js">
function onCameraPositionChange(event) {
alert('The camera position changed to:\n' +
'Horizontal: ' + event.horizontal + '\n' +
'Vertical: ' + event.vertical + '\n' +
'Distance: ' + event.distance);
}
// assuming var graph3d = new vis.Graph3d(document.getElementById('mygraph'));
graph3d.on('cameraPositionChange', onCameraPositionChange);
</pre>
<p>
The following events are available.
</p>
<table class="events">
<tr>
<th>name</th>
<th>Properties</th>
<th>Description</th>
</tr>
<tr>
<td>cameraPositionChange</td>
<td>
<ul>
<li><code>horizontal</code>: Number. The horizontal angle of the camera.</li>
<li><code>vertical</code>: Number. The vertical angle of the camera.</li>
<li><code>distance</code>: Number. The distance of the camera to the center of the graph.</li>
</ul>
</td>
<td>The camera position changed. Fired after the user modified the camera position
by moving (dragging) the graph, or by zooming (scrolling),
but not after a call to <code>setCameraPosition</code> method.
The new camera position can be retrieved by calling the method
<code>getCameraPosition</code>.</td>
</tr>
</table>
<h2 id="Data_Policy">Data Policy</h2>
<p>
All code and data are processed and rendered in the browser. No data is sent to any server.
</p>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../js/ie10-viewport-bug-workaround.js"></script>

+ 2
- 2
docs/index.html View File

@ -5,7 +5,7 @@
<title>vis.js | documentation</title>
<link href="css/prettify.css" type="text/css" rel="stylesheet" />
<link href='css/style.css' type='text/css' rel='stylesheet'>
<link href='css/old_style.css' type='text/css' rel='stylesheet'>
<script type="text/javascript" src="js/prettify/prettify.js"></script>
<script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-61231638-1', 'auto');ga('send', 'pageview');</script></head>
@ -61,7 +61,7 @@
Plot data on a timeline with lines or barcharts.
</li>
<li>
<a href="graph3d.html"><b>Graph3d</b></a>.
<a href="old/graph3d.html"><b>Graph3d</b></a>.
Display data in a three dimensional graph.
</li>
<li>

+ 12
- 12
docs/network/configure.html View File

@ -13,7 +13,7 @@
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
@ -118,24 +118,24 @@ network.setOptions(options);
<p>As shown above, alternative to supplying an object, you can supply a <code>String</code>, <code>Array</code>, <code>Function</code> or
<code>Boolean</code>. These will do the same as the filter option described below.</p>
<table class="moduleTable">
<table class="options">
<tr>
<th>name</th>
<th>type</th>
<th>default</th>
<th>description</th>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>enabled</td>
<td class="mid">Boolean</td>
<td class="mid"><code>true</code></td>
<td>Boolean</td>
<td><code>true</code></td>
<td>Toggle the configuration interface on or off. This is an optional parameter. If left undefined and any of the other properties of this object are defined, this will be set to true.
</td>
</tr>
<tr>
<td>filter</td>
<td class="mid">String, Array, Boolean, Function</td>
<td class="mid"><code>true</code></td>
<td>String, Array, Boolean, Function</td>
<td><code>true</code></td>
<td>When a boolean, true gives you all options, false will not show any. If a string is supplied, any
combination of the following is allowed: nodes, edges, layout, interaction, manipulation, physics,
selection, renderer. Feel free to come up with a fun seperating character. Finally, when supplied an
@ -150,8 +150,8 @@ function (option, path) {
</tr>
<tr>
<td>container</td>
<td class="mid">DOM element</td>
<td class="mid"><code>undefined</code></td>
<td>DOM element</td>
<td><code>undefined</code></td>
<td>This allows you to put the configure list in another HTML container than below the network.</td>
</tr>
</table>

+ 108
- 108
docs/network/edges.html View File

@ -11,7 +11,7 @@
<!-- Bootstrap core CSS -->
<link href="../css/bootstrap.css" rel="stylesheet">
<link href="../css/newdocs.css" rel="stylesheet">
<link href="../css/style.css" rel="stylesheet">
<link href="../css/prettify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="../js/googleAnalytics.js"></script>
@ -191,17 +191,17 @@ network.setOptions(options);
</pre>
<p>These options can also be set per individual edge.</p>
<table class="moduleTable" id="optionTable">
<table class="options" id="optionTable">
<tr>
<th>name</th>
<th>type</th>
<th>default</th>
<th>description</th>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','arrows', this);">
<td><span parent="arrows" class="right-caret"></span> arrows</td>
<td class="mid">Object or String</td>
<td class="mid"><code>undefined</code></td>
<td>Object or String</td>
<td><code>undefined</code></td>
<td>To draw an arrow with default settings a string can be supplied. For example: <code>arrows:'to, from,
middle'</code> or <code>'to;from'</code>, any combination with any seperating symbol is fine. If you
want to control the size of the arrowheads, you can supply an object.
@ -209,42 +209,42 @@ network.setOptions(options);
</tr>
<tr parent="arrows" class="hidden">
<td class="indent">arrows.to</td>
<td class="mid">Object or Boolean</td>
<td class="mid"><code>Object</code></td>
<td>Object or Boolean</td>
<td><code>Object</code></td>
<td>When true, an arrowhead on the 'to' side of the edge is drawn, pointing to the 'to' node with default
settings. To customize the size of the arrow, supply an object.
</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent2">arrows.to.enabled</td>
<td class="mid">Boolean</td>
<td class="mid"><code>false</code></td>
<td>Boolean</td>
<td><code>false</code></td>
<td>Toggle the arrow on or off. This option is optional, if undefined and the scaleFactor property is set,
enabled will be set to true.
</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent2">arrows.to.scaleFactor</td>
<td class="mid">Number</td>
<td class="mid"><code>1</code></td>
<td>Number</td>
<td><code>1</code></td>
<td>The scale factor allows you to change the size of the arrowhead.</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent">arrows.middle</td>
<td class="mid">Object or Boolean</td>
<td class="mid"><code>Object</code></td>
<td>Object or Boolean</td>
<td><code>Object</code></td>
<td>Exactly the same as the to object but with an arrowhead in the center of the edge.</td>
</tr>
<tr parent="arrows" class="hidden">
<td class="indent">arrows.from</td>
<td class="mid">Object or Boolean</td>
<td class="mid"><code>Object</code></td>
<td>Object or Boolean</td>
<td><code>Object</code></td>
<td>Exactly the same as the to object but with an arrowhead at the from node of the edge.</td>
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','color', this);">
<td><span parent="color" class="right-caret"></span> color</td>
<td class="mid">Object or String</td>
<td class="mid"><code>Object</code></td>
<td>Object or String</td>
<td><code>Object</code></td>
<td>The color object contains the color information of the edge in every situation. When the edge only needs
a single color, a color value like <code>'rgb(120,32,14)'</code>, <code>'#ffffff'</code> or
<code>'red'</code> can be supplied instead of an object.
@ -252,30 +252,30 @@ network.setOptions(options);
</tr>
<tr parent="color" class="hidden">
<td class="indent">color.color</td>
<td class="mid">String</td>
<td class="mid"><code>'#848484'</code></td>
<td>String</td>
<td><code>'#848484'</code></td>
<td>The color of the border of the node when it is not selected or hovered over <i>(assuming hover is
enabled in the interaction module)</i>.
</td>
</tr>
<tr parent="color" class="hidden">
<td class="indent">color.highlight</td>
<td class="mid">String</td>
<td class="mid"><code>'#848484'</code></td>
<td>String</td>
<td><code>'#848484'</code></td>
<td>The color the edge when it is selected.</td>
</tr>
<tr parent="color" class="hidden">
<td class="indent">color.hover</td>
<td class="mid">String</td>
<td class="mid"><code>'#848484'</code></td>
<td>String</td>
<td><code>'#848484'</code></td>
<td>The color the edge when the mouse hovers over it <i>(assuming hover is enabled in the interaction
module)</i>.
</td>
</tr>
<tr parent="color" class="hidden">
<td class="indent">color.inherit</td>
<td class="mid">String or Boolean</td>
<td class="mid"><code>'from'</code></td>
<td>String or Boolean</td>
<td><code>'from'</code></td>
<td><i>When color, highlight or hover are defined, inherit is set to false!</i>
<br><br>Supported options are: <code>true, false, 'from','to','both'</code>.
<br><br>The default value is 'from' which does the same as true: the edge will inherit the color from
@ -288,8 +288,8 @@ network.setOptions(options);
</tr>
<tr parent="color" class="hidden">
<td class="indent">color.opacity</td>
<td class="mid">Number</td>
<td class="mid"><code>1.0</code></td>
<td>Number</td>
<td><code>1.0</code></td>
<td>It can be useful to set the opacity of an edge without manually changing all the colors. The opacity
option will convert all colors (also when using inherit) to adhere to the supplied opacity. The allowed
range of the opacity option is between <code>0 and 1</code>. This is only done once so the performance
@ -298,8 +298,8 @@ network.setOptions(options);
</tr>
<tr>
<td>dashes</td>
<td class="mid">Array or Boolean</td>
<td class="mid"><code>false</code></td>
<td>Array or Boolean</td>
<td><code>false</code></td>
<td>When true, the edge will be drawn as a dashed line. You can customize the dashes by supplying an Array.
Array formart: Array of numbers, gap length, dash length, gap length, dash length, ... etc. The array is
repeated until the distance is filled.
@ -308,56 +308,56 @@ network.setOptions(options);
</tr>
<tr class='toggle collapsible' onclick="toggleTable('optionTable','font', this);">
<td><span parent="font" class="right-caret"></span> font</td>
<td class="mid">Object or String</td>
<td class="mid"><code>false</code></td>
<td>Object or String</td>
<td><code>false</code></td>
<td>This object defines the details of the label. A shorthand is also supported in the form <code>'size face
color'</code> for example: <code>'14px arial red'</code>.
</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.color</td>
<td class="mid">String</td>
<td class="mid"><code>'#343434'</code></td>
<td>String</td>
<td><code>'#343434'</code></td>
<td>Color of the label text.</td>
</tr>
<tr parent="font" class="hidden">
<td class="indent">font.size</td>
<td class="mid">Number</td>
<td class=