diff --git a/docs/css/newdocs.css b/docs/css/newdocs.css deleted file mode 100644 index f1989d99..00000000 --- a/docs/css/newdocs.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/docs/css/old_style.css b/docs/css/old_style.css new file mode 100644 index 00000000..d9382b0d --- /dev/null +++ b/docs/css/old_style.css @@ -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; +} \ No newline at end of file diff --git a/docs/css/style.css b/docs/css/style.css index d9382b0d..45a7fd10 100644 --- a/docs/css/style.css +++ b/docs/css/style.css @@ -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; } \ No newline at end of file diff --git a/docs/dataset.html b/docs/dataset.html index 94a1ab9e..48007fad 100644 --- a/docs/dataset.html +++ b/docs/dataset.html @@ -5,7 +5,7 @@
+ 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. +
++ Graph3d uses HTML canvas + to render graphs, and can render up to a few thousands of data points smoothly. +
+ ++ The following code shows how to create a Graph3d and provide it with data. + More examples can be found in the examples directory. +
+ ++<!DOCTYPE HTML> +<html> +<head> + <title>Graph 3D demo</title> + + <style> + body {font: 10pt arial;} + </style> + + <script type="text/javascript" src="../../dist/vis.js"></script> + + <script type="text/javascript"> + 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 < axisMax; x+=axisStep) { + for (var y = 0; y < 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); + } + </script> +</head> + +<body onload="drawVisualization();"> + <div id="mygraph"></div> +</body> +</html> + ++ + +
+ The class name of the Graph3d is vis.Graph3d
.
+ 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 DataSet
or an Array
, described in
+ section Data Format.
+ Options is a name-value map in the JSON format. The available options
+ are described in section Configuration Options.
+
var graph = new vis.Graph3d(container [, data] [, options]);+ +
+ Data and options can be set or changed later on using the functions
+ Graph3d.setData(data)
and Graph3d.setOptions(options)
.
+
+ Graph3d can load data from an Array
, a DataSet
or a DataView
.
+ JSON objects are added to this DataSet by using the add()
function.
+ Data points must have properties x
, y
, and z
,
+ and can optionally have a property style
and filter
.
+
+
+ The DataSet JSON objects are defined as: +
+ +Name | +Type | +Required | +Description | +
---|---|---|---|
x | +number | +yes | +Location on the x-axis. | +
y | +number | +yes | +Location on the y-axis. | +
z | +number | +yes | +Location on the z-axis. | +
style | +number | +no | +The data value, required for graph styles dot-color and
+ dot-size .
+ |
+
filter | +* | +no | +Filter values used for the animation. + This column may have any type, such as a number, string, or Date. | +
+ Options can be used to customize the graph. Options are defined as a JSON object. + All options are optional. +
+ ++var options = { + width: '100%', + height: '400px', + style: 'surface' +}; ++ +
+ The following options are available. +
+ +Name | +Type | +Default | +Description | +
---|---|---|---|
animationInterval | +number | +1000 | +The animation interval in milliseconds. This determines how fast + the animation runs. | +
animationPreload | +boolean | +false | +If false, the animation frames are loaded as soon as they are requested.
+ if animationPreload 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. |
+
animationAutoStart | +boolean | +false | +If true, the animation starts playing automatically after the graph + is created. | +
backgroundColor | +string or Object | +'white' | +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. | +
backgroundColor.stroke | +string | +'gray' | +The color of the chart border, as an HTML color string. | +
backgroundColor.strokeWidth | +number | +1 | +The border width, in pixels. | +
backgroundColor.fill | +string | +'white' | +The chart fill color, as an HTML color string. | +
cameraPosition | +Object | +{horizontal: 1.0, vertical: 0.5, distance: 1.7} | +Set the initial rotation and position of the camera.
+ The object cameraPosition contains three parameters:
+ horizontal , vertical , and distance .
+ Parameter horizontal is a value in radians and can have any
+ value (but normally in the range of 0 and 2*Pi).
+ Parameter vertical is a value in radians between 0 and 0.5*Pi.
+ Parameter distance 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.
+ |
height | +string | +'400px' | +The height of the graph in pixels or as a percentage. | +
keepAspectRatio | +boolean | +true | +If keepAspectRatio 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. |
+
showAnimationControls | +boolean | +true | +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. | +
showGrid | +boolean | +true | +If true, grid lines are draw in the x-y surface (the bottom of the 3d + graph). | +
showPerspective | +boolean | +true | +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. + | +
showShadow | +boolean | +false | +Show shadow on the graph. | +
style | +string | +'dot' | +The style of the 3d graph. Available styles:
+ bar ,
+ bar-color ,
+ bar-size ,
+ dot ,
+ dot-line ,
+ dot-color ,
+ dot-size ,
+ line ,
+ grid ,
+ or surface |
+
tooltip | +boolean | function | +false | +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 tooltip . In this case the function is called
+ with an object containing parameters x ,
+ y , and z argument,
+ and must return a string which may contain HTML.
+ |
+
valueMax | +number | +none | +The maximum value for the value-axis. Only available in combination
+ with the styles dot-color and dot-size . |
+
valueMin | +number | +none | +The minimum value for the value-axis. Only available in combination
+ with the styles dot-color and dot-size . |
+
verticalRatio | +number | +0.5 | +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. | +
width | +string | +'400px' | +The width of the graph in pixels or as a percentage. | +
xBarWidth | +number | +none | +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 'bar' and 'bar-color' . |
+
xCenter | +string | +'55%' | +The horizontal center position of the graph, as a percentage or in + pixels. | +
xMax | +number | +none | +The maximum value for the x-axis. | +
xMin | +number | +none | +The minimum value for the x-axis. | +
xStep | +number | +none | +Step size for the grid on the x-axis. | +
xValueLabel | +function | +none | +A function for custom formatting of the labels along the x-axis,
+ for example function (x) {return (x * 100) + '%'} .
+ |
+
yBarWidth | +number | +none | +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 'bar' and 'bar-color' . |
+
yCenter | +string | +'45%' | +The vertical center position of the graph, as a percentage or in + pixels. | +
yMax | +number | +none | +The maximum value for the y-axis. | +
yMin | +number | +none | +The minimum value for the y-axis. | +
yStep | +number | +none | +Step size for the grid on the y-axis. | +
yValueLabel | +function | +none | +A function for custom formatting of the labels along the y-axis,
+ for example function (y) {return (y * 100) + '%'} .
+ |
+
zMin | +number | +none | +The minimum value for the z-axis. | +
zMax | +number | +none | +The maximum value for the z-axis. | +
zStep | +number | +none | +Step size for the grid on the z-axis. | +
zValueLabel | +function | +none | +A function for custom formatting of the labels along the z-axis,
+ for example function (z) {return (z * 100) + '%'} .
+ |
+
xLabel | +String | +x | +Label on the X axis. | +
yLabel | +String | +y | +Label on the Y axis. | +
zLabel | +String | +z | +Label on the Z axis. | +
filterLabel | +String | +time | +Label for the filter column. | +
legendLabel | +String | +value | +Label for the style description. | +
+ Graph3d supports the following methods. +
+ +Method | +Return Type | +Description | +
---|---|---|
animationStart() | +none | +Start playing the animation. + Only applicable when animation data is available. | +
animationStop() | +none | +Stop playing the animation. + Only applicable when animation data is available. | +
getCameraPosition() | +An object with parameters horizontal ,
+ vertical and distance |
+ Returns an object with parameters horizontal ,
+ vertical and distance ,
+ which each one of them is a number, representing the rotation and position
+ of the camera. |
+
redraw() | +none | +Redraw the graph. Useful after the camera position is changed externally, + when data is changed, or when the layout of the webpage changed. | +
setData(data) | +none | +Replace the data in the Graph3d. | +
setOptions(options) | +none | +Update options of Graph3d. + The provided options will be merged with current options. | +
setSize(width, height) | +none | +Parameters width and height are strings,
+ containing a new size for the graph. Size can be provided in pixels
+ or in percentages. |
+
setCameraPosition (pos) | +{horizontal: 1.0, vertical: 0.5, distance: 1.7} | +Set the rotation and position of the camera. Parameter pos
+ is an object which contains three parameters: horizontal ,
+ vertical , and distance .
+ Parameter horizontal is a value in radians and can have any
+ value (but normally in the range of 0 and 2*Pi).
+ Parameter vertical is a value in radians between 0 and 0.5*Pi.
+ Parameter distance 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.
+ |
+
+ 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 cameraPositionChange
event.
+
+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); ++ +
+ The following events are available. +
+ +name | +Properties | +Description | +
---|---|---|
cameraPositionChange | +
+
|
+ 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 setCameraPosition method.
+ The new camera position can be retrieved by calling the method
+ getCameraPosition . |
+
+ All code and data are processed and rendered in the browser. No data is sent to any server. +
+ +As shown above, alternative to supplying an object, you can supply a String
, Array
, Function
or
Boolean
. These will do the same as the filter option described below.
name | -type | -default | -description | +Name | +Type | +Default | +Description |
---|---|---|---|---|---|---|---|
enabled | -Boolean | -true |
+ Boolean | +true |
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. | ||
filter | -String, Array, Boolean, Function | -true |
+ String, Array, Boolean, Function | +true |
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) { | ||
container | -DOM element | -undefined |
+ DOM element | +undefined |
This allows you to put the configure list in another HTML container than below the network. |
These options can also be set per individual edge.
-name | -type | -default | -description | +Name | +Type | +Default | +Description |
---|---|---|---|---|---|---|---|
arrows | -Object or String | -undefined |
+ Object or String | +undefined |
To draw an arrow with default settings a string can be supplied. For example: arrows:'to, from,
middle' or 'to;from' , 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);
| ||
arrows.to | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
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. | ||
arrows.to.enabled | -Boolean | -false |
+ Boolean | +false |
Toggle the arrow on or off. This option is optional, if undefined and the scaleFactor property is set, enabled will be set to true. | ||
arrows.to.scaleFactor | -Number | -1 |
+ Number | +1 |
The scale factor allows you to change the size of the arrowhead. | ||
arrows.middle | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
Exactly the same as the to object but with an arrowhead in the center of the edge. | ||
arrows.from | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
Exactly the same as the to object but with an arrowhead at the from node of the edge. | ||
color | -Object or String | -Object |
+ Object or String | +Object |
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 'rgb(120,32,14)' , '#ffffff' or
'red' can be supplied instead of an object.
@@ -252,30 +252,30 @@ network.setOptions(options);
| ||
color.color | -String | -'#848484' |
+ String | +'#848484' |
The color of the border of the node when it is not selected or hovered over (assuming hover is enabled in the interaction module). | ||
color.highlight | -String | -'#848484' |
+ String | +'#848484' |
The color the edge when it is selected. | ||
color.hover | -String | -'#848484' |
+ String | +'#848484' |
The color the edge when the mouse hovers over it (assuming hover is enabled in the interaction module). | ||
color.inherit | -String or Boolean | -'from' |
+ String or Boolean | +'from' |
When color, highlight or hover are defined, inherit is set to false!
Supported options are: true, false, 'from','to','both' .
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); | ||
color.opacity | -Number | -1.0 |
+ Number | +1.0 |
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 0 and 1 . This is only done once so the performance
@@ -298,8 +298,8 @@ network.setOptions(options);
| ||
dashes | -Array or Boolean | -false |
+ Array or Boolean | +false |
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); | ||
font | -Object or String | -false |
+ Object or String | +false |
This object defines the details of the label. A shorthand is also supported in the form 'size face
color' for example: '14px arial red' .
|
||
font.color | -String | -'#343434' |
+ String | +'#343434' |
Color of the label text. | ||
font.size | -Number | -14 |
+ Number | +14 |
Size of the label text. | ||
font.face | -String | -'arial' |
+ String | +'arial' |
Font face (or font family) of the label text. | ||
font.background | -String | -undefined |
+ String | +undefined |
When not undefined but a color string, a background rectangle will be drawn behind
the label in the supplied color.
|
||
font.strokeWidth | -Number | -2 |
+ Number | +2 |
As an alternative to the background rectangle, a stroke can be drawn around the text. When a value higher than 0 is supplied, the stroke will be drawn. | ||
font.strokeColor | -String | -'#ffffff' |
+ String | +'#ffffff' |
This is the color of the stroke assuming the value for stroke is higher than 0. | ||
font.align | -String | -'horizontal' |
+ String | +'horizontal' |
Possible options: 'horizontal','top','middle','bottom' . The alignment determines how the
label is aligned over the edge. The default value horizontal aligns the label horizontally,
regardless of the orientation of the edge. When an option other than horizontal is chosen,
@@ -366,14 +366,14 @@ network.setOptions(options);
| ||
hidden | -Boolean | -false |
+ Boolean | +false |
When true, the edge is not drawn. It is part still part of the physics simulation however! | ||
hoverWidth | -Number or Function | -0.5 |
+ Number or Function | +0.5 |
Assuming the hover behaviour is enabled in the interaction module, the hoverWidth determines the width of the edge when the user hovers over it with the mouse. If a number is supplied, this number will be added to the width. @@ -394,34 +394,34 @@ var options: { | ||
id | -String | -undefined |
+ String | +undefined |
The id of the edge. The id is optional for edges. When not supplied, an UUID will be assigned to the edge. | ||
label | -String | -undefined |
+ String | +undefined |
The label of the edge. HTML does not work in here because the network uses HTML5 Canvas. | ||
length | -Number | -undefined |
+ Number | +undefined |
The physics simulation gives edges a spring length. This value can override the length of the spring in rest. | ||
physics | -Boolean | -true |
+ Boolean | +true |
When true, the edge is part of the physics simulation. When false, it will not act as a spring. | ||
scaling | -Object | -Object |
+ Object | +Object |
If the value option is specified, the width of the edges will be scaled according to the
properties in this object. Keep in mind that when using scaling, the width option is
neglected.
@@ -429,58 +429,58 @@ var options: {
| ||
scaling.min | -Number | -1 |
+ Number | +1 |
If edges have a value, their widths are determined by the value, the scaling function and the min max values. The min value is the minimum allowed value. | ||
scaling.max | -Number | -15 |
+ Number | +15 |
This is the maximum allowed width when the edges are scaled using the value option. | ||
scaling.label | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
When false, the label is not allowed to scale with the edge. If true it will scale using default settigns. For further customization, you can supply an object. | ||
scaling.label.enabled | -Boolean | -false |
+ Boolean | +false |
Toggle the scaling of the label on or off. If this option is not defined, it is set to true if any of the properties in this object are defined. | ||
scaling.label.min | -Number | -14 |
+ Number | +14 |
The minimum font-size used for labels when scaling. | ||
scaling.label.max | -Number | -30 |
+ Number | +30 |
The maximum font-size used for labels when scaling. | ||
scaling.label.maxVisible | -Number | -30 |
+ Number | +30 |
When zooming in, the font is drawn larger as well. You can limit the perceived font size using this option. If set to 30, the font will never look larger than size 30 zoomed at 100%. | ||
scaling.label.drawThreshold | -Number | -3 |
+ Number | +3 |
When zooming out, the font will be drawn smaller. This defines a lower limit for when the font is drawn. When using font scaling, you can use this together with the maxVisible to first show labels of important edges when zoomed out and only show the rest when zooming in. @@ -488,8 +488,8 @@ var options: { | ||
scaling.customScalingFunction | -Function | -in description | +Function | +in description | If edges have value fields, this function determines how the size of the nodes are scaled
based on their values. The default function is:
@@ -515,8 +515,8 @@ myWidth = minWidth + diff * scale; | ||
selectionWidth | -Number or Function | -1 |
+ Number or Function | +1 |
The selectionWidth determines the width of the edge when the edge is selected. If a number is supplied, this number will be added to the width. Because the width can be altered by the value and the scaling functions, a constant multiplier or added @@ -535,48 +535,48 @@ var options: { | ||
selfReferenceSize | -Number | -false |
+ Number | +false |
When the to and from nodes are the same, a circle is drawn. This is the radius of that circle. | ||
shadow | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
When true, the edge casts a shadow using the default settings. This can be further refined by supplying an object. | ||
shadow.enabled | -Boolean | -false |
+ Boolean | +false |
Toggle the casting of shadows. If this option is not defined, it is set to true if any of the properties in this object are defined. | ||
shadow.size | -Number | -10 |
+ Number | +10 |
The blur size of the shadow. | ||
shadow.x | -Number | -5 |
+ Number | +5 |
The x offset. | ||
shadow.y | -Number | -5 |
+ Number | +5 |
The y offset. | ||
smooth | -Object or Boolean | -Object |
+ Object or Boolean | +Object |
When true, the edge is drawn as a dynamic quadratic bezier curve. The drawing of these curves takes longer than that of straight curves but it looks better. There is a difference between dynamic smooth curves and static smooth curves. The dynamic smooth curves @@ -586,16 +586,16 @@ var options: { | ||
smooth.enabled | -Boolean | -true |
+ Boolean | +true |
Toggle smooth curves on and off. This is an optional option. If any of the other properties in this object are set, this option will be set to true. | ||
smooth.type | -String | -'dynamic' |
+ String | +'dynamic' |
Possible options: 'dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal',
'vertical', 'curvedCW', 'curvedCCW' . Take a look at our example 26 to see what these look like
and pick the one that you like best!
@@ -606,29 +606,29 @@ var options: {
| ||
smooth.roundness | -Number | -0.5 |
+ Number | +0.5 |
Accepted range: 0 .. 1.0 . This parameter tweaks the roundness of the smooth curves for all types EXCEPT dynamic.
|
||
title | -String | -undefined |
+ String | +undefined |
The title is shown in a pop-up when the mouse moves over the edge. | ||
value | -Number | -undefined |
+ Number | +undefined |
When a value is set, the edges' width will be scaled using the options in the scaling object defined above. | ||
width | -Number | -1 |
+ Number | +1 |
The width of the edge. If value is set, this is not used. |
All of the individual options are explained here:
-name | -type | -default | -description | +Name | +Type | +Default | +Description |
---|---|---|---|---|---|---|---|
useDefaultGroups | -Boolean | -true |
+ Boolean | +true |
If your nodes have groups defined that are not in the Groups module, the module loops over the groups it does have, allocating one for each unknown group. When all are used, it goes back to the first group. By setting this to false, the default groups will not be used in this cycle. @@ -123,8 +123,8 @@ network.setOptions(options); | ||
group* | -Object | -
|
+ Object | +
|
You can add multiple groups containing styling information that applies to a certain subset of groups. All options described in the nodes module that make sense can be used here diff --git a/docs/network/index.html b/docs/network/index.html index a9212308..fc55fa87 100644 --- a/docs/network/index.html +++ b/docs/network/index.html @@ -11,7 +11,7 @@ - + - + - + B so B is a level lower than A. |
All of the individual options are explained here:
-name | type | default | description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
barnesHut | Object | Object | BarnesHut is a quadtree based gravity model. This is the fastest, default and recommended solver for non-hierarchical layouts. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.gravitationalConstant | Number | -2000 | Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.centralGravity | Number | 0.3 | There is a central gravity attractor to pull the entire network back to the center. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.springLength | Number | 95 | The edges are modelled as springs. This springLength here is the the rest length of the spring. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.springConstant | Number | 0.04 | This is how 'sturdy' the springs are. Higher values mean stronger springs. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.damping | Number | 0.09 | Accepted range: [0 .. 1] . The damping factor is how much of the velocity from the previous physics simulation iteration carries over to the next iteration. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
barnesHut.avoidOverlap | Number | 0 | Accepted range: [0 .. 1] . When larger than 0, the size of the node is taken into account. The distance will be calculated from the radius of the encompassing circle of the node for both the gravity model and the spring model. Value 1 is maximum overlap avoidance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
forceAtlas2Based | Object | Object | Force Atlas 2 has been developed by Jacomi et al (2014) for use with Gephi. The forceAtlas2Based solver makes use of some of the equations provided
+
ExampleThe following code shows how to create a Graph3d and provide it with data. - More examples can be found in the examples directory. + More examples can be found in the examples directory. diff --git a/docs/network/old/canvas.html b/docs/old/old_network/canvas.html similarity index 98% rename from docs/network/old/canvas.html rename to docs/old/old_network/canvas.html index 41b9770c..8e519b05 100644 --- a/docs/network/old/canvas.html +++ b/docs/old/old_network/canvas.html @@ -100,7 +100,7 @@ var options = { network.setOptions(options); All of the individual options are explained here: -
|